From: Greg Sabino Mullane Date: Fri, 24 Apr 2009 15:50:05 +0000 (-0400) Subject: Fix size_to_bytes typo, adjust POD. X-Git-Tag: 2.9.0~82 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=b77266584315f3aad81dcadb1d8626c3593b797a;p=check_postgres.git Fix size_to_bytes typo, adjust POD. --- diff --git a/check_postgres.pl b/check_postgres.pl index bf6efe3a6..37f0d86e7 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1744,12 +1744,13 @@ sub verify_version { sub size_in_bytes { ## no critic (RequireArgUnpacking) ## Given a number and a unit, return the number of bytes. + ## Defaults to bytes my ($val,$unit) = ($_[0],lc substr($_[1]||'s',0,1)); - return $val * ($unit eq 's' ? 1 : $unit eq 'k' ? 1024 : $unit eq 'm' ? 1024**2 : + return $val * ($unit eq 'b' ? 1 : $unit eq 'k' ? 1024 : $unit eq 'm' ? 1024**2 : $unit eq 'g' ? 1024**3 : $unit eq 't' ? 1024**4 : $unit eq 'p' ? 1024**5 : $unit eq 'e' ? 1024**6 : - $unit eq 'z' ? 1024**7 : 1024**8); + $unit eq 'z' ? 1024**7 : 1); } ## end of size_in_bytes @@ -5691,7 +5692,7 @@ first line. The fourth line gives the name of the database. (C) Checks the length of "idle in transaction" queries on one or more databases. There is no need to run this more than once on the same database cluster. Databases can be filtered -by using the I<--include> and I<--exclude> options. See the L<"BASIC FILTERING"> +by using the I<--include> and I<--exclude> options. See the L section below for more details. The I<--warning> and I<--critical> options are given as units of time, and both must