Permalink
Browse files

Fixed duplicate ACLs and Comments on similarly named objects in diffe…

…rent schemas. Previous was just for functions. This fixes for all objects
  • Loading branch information...
1 parent b80e303 commit fc6762b490943a09a826461735bb8f95fff79bbd @keithf4 keithf4 committed Mar 1, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 pg_extractor.pl
View
@@ -670,12 +670,12 @@ sub create_ddl_files {
my $dupefunc;
# add to current file output if first found object has an ACL or comment
foreach my $a (@acl_list) {
- if ($a->{'name'} eq $t->{'name'}) {
+ if ($a->{'schema'} eq $t->{'schema'} && $a->{'name'} eq $t->{'name'}) {
$list_file_contents .= "$a->{id} $a->{type} $a->{schema} $a->{name} $a->{owner}\n";
}
}
foreach my $c (@commentlist) {
- if ($c->{'name'} eq $t->{'name'}) {
+ if ($c->{'schema'} eq $t->{'schema'} && $c->{'name'} eq $t->{'name'}) {
$list_file_contents .= "$c->{id} $c->{type} $c->{schema} $c->{subtype} $c->{name} $c->{owner}\n";
}
}
@@ -705,12 +705,12 @@ sub create_ddl_files {
# add to current file output if this object has an ACL
foreach my $a (@acl_list) {
- if ($a->{'name'} eq $t->{'name'}) {
+ if ($a->{'schema'} eq $t->{'schema'} && $a->{'name'} eq $t->{'name'}) {
$list_file_contents .= "$a->{id} $a->{type} $a->{schema} $a->{name} $a->{owner}\n";
}
}
foreach my $c (@commentlist) {
- if ($c->{'name'} eq $t->{'name'}) {
+ if ($c->{'schema'} eq $t->{'schema'} && $c->{'name'} eq $t->{'name'}) {
$list_file_contents .= "$c->{id} $c->{type} $c->{schema} $c->{subtype} $c->{name} $c->{owner}\n";
}
}

0 comments on commit fc6762b

Please sign in to comment.