same_schema --exclude should skip triggers too.
authorGreg Sabino Mullane <[email protected]>
Thu, 27 Aug 2009 22:19:18 +0000 (18:19 -0400)
committerGreg Sabino Mullane <[email protected]>
Thu, 27 Aug 2009 22:19:18 +0000 (18:19 -0400)
check_postgres.pl

index a49b29fe923f5ec7999415f8719c63c9facb0fd7..88268283198b1366a8f982912f331f9531143450 100755 (executable)
@@ -5131,6 +5131,11 @@ SQL
                                next TRIGGER1 if $name =~ /$regex/;
                        }
                }
+
+               for my $exclude (@{$opt{exclude}}) {
+                       next TRIGGER1 if $name =~ /$exclude/;
+               }
+
                push @{$fail{triggers}{notexist}{1}} => $name;
                $failcount++;
        }
@@ -5149,6 +5154,10 @@ SQL
                        next;
                }
 
+               for my $exclude (@{$opt{exclude}}) {
+                       next TRIGGER2 if $name =~ /$exclude/;
+               }
+
                ## Do the triggers call the same function?
                if (
                        $thing{1}{triggers}{$name}{func} ne $thing{2}{triggers}{$name}{func}