diff options
author | glynastill | 2015-04-16 12:26:37 +0000 |
---|---|---|
committer | glyn | 2016-06-07 12:00:52 +0000 |
commit | e32a89302830a5dc75ad524fab3642ce8981d4ca (patch) | |
tree | b27304804ec6b2cc78a03e6b889d1ec467250c67 | |
parent | 506a40846cc47a507c079e593b34a70f7b60e1a6 (diff) |
Fix "--filter" logic to honour regular expressions
As per the manual:
"To exclude objects of a certain type by a regular expression against their name, use "noname=regex"."
However the actual check in the script would only filter on an exact match; switched to regex.
-rw-r--r-- | check_postgres.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index c04e98893..608f1dbdf 100644 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -7260,7 +7260,7 @@ sub schema_item_exists { for my $name (sort keys %{ $itemhash->{$db1}{$item_class} }) { ## Can exclude by 'filter' based regex - next if grep { $name eq $_ } @$exclude_regex; + next if grep { $name =~ $_ } @$exclude_regex; if (! exists $itemhash->{$db2}{$item_class}{$name}) { @@ -7336,7 +7336,7 @@ sub schema_item_differences { for my $name (sort keys %{ $itemhash->{$db1}{$item_class} }) { ## Can exclude by 'filter' based regex - next if grep { $name eq $_ } @$exclude_regex; + next if grep { $name =~ $_ } @$exclude_regex; ## This case has already been handled: next if ! exists $itemhash->{$db2}{$item_class}{$name}; |