summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2008-09-30 11:45:59 +0000
committerGreg Sabino Mullane2008-09-30 11:45:59 +0000
commit88186e8cca95e2b2ba1c96b0323ad98b727c4a57 (patch)
treeb89725f8fc66ee0ecf014d60dad9fea689a6a8a2 /check_postgres.pl
parente976b63a5cf487b878dee7036618231eb0a58a74 (diff)
Squirrel away old value before verify call.
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}};