summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 2a7ed157b..f0a69fc7b 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -981,9 +981,12 @@ sub run_command {
## If we were provided with a regex, check and bail if it fails
elsif ($arg->{regex}) {
if ($db->{slurp} !~ $arg->{regex}) {
- ## Check if problem is due to backend being to old for this check
+ my $oldslurp = $db->{slurp};
+
+ ## Check if problem is due to backend being too old for this check
verify_version($db->{slurp});
+ $db->{slurp} = $oldslurp;
add_unknown qq{T-BAD-QUERY $db->{slurp}};
## Remove it from the returned hash
pop @{$info->{db}};