diff options
-rwxr-xr-x | check_postgres.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 05353e673..b479d7819 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -4803,12 +4803,15 @@ SQL next; } my ($cschema,$cname,$tschema,$tname,$col,$cdef) = ($6,$7,$2,$3,$4,$8); - if (exists $thing{$x}{colconstraints}{"$cschema.$cname"}) { - my @oldcols = split / / => $thing{$x}{colconstraints}{"$cschema.$cname"}->[1]; - push @oldcols => $col; - $col = join ' ' => sort @oldcols; + ## No sense in grabbing "generic" constraints + if ($cname !~ /^\$\d+$/o) { + if (exists $thing{$x}{colconstraints}{"$cschema.$cname"}) { + my @oldcols = split / / => $thing{$x}{colconstraints}{"$cschema.$cname"}->[1]; + push @oldcols => $col; + $col = join ' ' => sort @oldcols; + } + $thing{$x}{colconstraints}{"$cschema.$cname"} = ["$tschema.$tname", $col, $cdef]; } - $thing{$x}{colconstraints}{"$cschema.$cname"} = ["$tschema.$tname", $col, $cdef]; } } } |