summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-02-03 05:54:28 +0000
committerGreg Sabino Mullane2011-02-03 05:54:28 +0000
commit8f54429bd4cec882f2dd8876f88da4b5d9101ca9 (patch)
tree7947b1eea11a2fb55cf04e41c7f5c155ddaa79e8 /check_postgres.pl
parentaa7a0f44995eac442872420c4248ab7621d1df18 (diff)
Return empty, not undef, for "ccount"
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index c8958cfd0..dac2d6a5a 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2547,7 +2547,9 @@ sub validate_size_or_percent_with_oper {
} ## end of validate_size_or_percent_with_oper
+
sub validate_integer_for_time {
+
my $arg = shift || {};
ndie qq{validate_integer_for_time must be called with a hashref\n}
unless ref $arg eq 'HASH';
@@ -2579,9 +2581,10 @@ sub validate_integer_for_time {
if ($val =~ /^[-+]\d+$/) {
ndie msg('range-int', $level) if $val !~ /^[-+]?\d+$/;
push @ret, int $val, undef;
- } else {
+ }
+ else {
# Assume time for backwards compatibility.
- push @ret, undef, size_in_seconds($val, $level);
+ push @ret, '', size_in_seconds($val, $level);
}
}
}
@@ -2591,8 +2594,10 @@ sub validate_integer_for_time {
}
return @ret;
+
} ## end of validate_integer_for_time
+
sub check_autovac_freeze {
## Check how close all databases are to autovacuum_freeze_max_age