From: Greg Sabino Mullane Date: Wed, 8 Oct 2008 14:29:01 +0000 (-0400) Subject: Roll out 2.3.2, fixes quoting problem notes by Glyn Astill X-Git-Tag: 2.9.0~231 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e2d0be5281d7c4c992d0c0fcef6ac8af36719b93;p=check_postgres.git Roll out 2.3.2, fixes quoting problem notes by Glyn Astill --- diff --git a/check_postgres.pl b/check_postgres.pl index 6c2ab8c5d..bf5515b99 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -28,7 +28,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.3.1'; +our $VERSION = '2.3.2'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -3344,10 +3344,10 @@ sub check_replicate_row { } my ($table,$pk,$id,$col,$val1,$val2) = (@repinfo); - ## Quote funky identifiers - $table = qq{"$table"} if $table !~ /^\w+$/; - $pk = qq{"$pk"} if $pk !~ /^\w+$/; - $col = qq{"$col"} if $col !~ /^\w+$/; + ## Quote everything, just to be safe (e.g. columns named 'desc') + $table = qq{"$table"}; + $pk = qq{"$pk"}; + $col = qq{"$col"}; if ($val1 eq $val2) { ndie 'Makes no sense to test replication with same values'; @@ -3549,7 +3549,7 @@ sub check_sequence { =head1 NAME B - a Postgres monitoring script for Nagios, MRTG, and others -This documents describes check_postgres.pl version 2.3.1 +This documents describes check_postgres.pl version 2.3.2 =head1 SYNOPSIS @@ -4690,6 +4690,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B + + Always quote identifiers in check_replicate_row action. + =item B Give a better error if one of the databases cannot be reached. diff --git a/check_postgres.pl.asc b/check_postgres.pl.asc index 9b2a78559..39f0eb1e6 100644 --- a/check_postgres.pl.asc +++ b/check_postgres.pl.asc @@ -1,6 +1,6 @@ -----BEGIN PGP SIGNATURE----- -iEYEABEDAAYFAkjrhvsACgkQvJuQZxSWSsgSEwCgy3WmBhnT+IDOHIS32D4KkWNk -+OkAoMApAyuIV8zbL+7+QrVgSmxozNUt -=tTHE +iEYEABEDAAYFAkjsw6cACgkQvJuQZxSWSshhtQCfTE8t7CFn2Xfmtt8E/GoTvyOI +kvoAoNYdHSGahtDWRINR8oRqEU+XOaqB +=xyuQ -----END PGP SIGNATURE----- diff --git a/check_postgres.pl.html b/check_postgres.pl.html index 7ec4ee714..43ea6c31e 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -90,7 +90,7 @@

NAME

check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, and others -This documents describes check_postgres.pl version 2.3.1

+This documents describes check_postgres.pl version 2.3.2


@@ -1119,6 +1119,12 @@ feature requests, and commit notices, send email to HISTORY

Items not specifically attributed are by Greg Sabino Mullane.

+
Version 2.3.2
+ +
+
+ Always quote identifiers in check_replicate_row action.
+
Version 2.3.1
diff --git a/index.html b/index.html index e09fdf106..263293034 100644 --- a/index.html +++ b/index.html @@ -21,14 +21,14 @@ h1 {

check_postgres.pl

-

check_postgres.pl is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of End Point Corporation and is BSD-licensed. The latest version is 2.3.1, and was released on October 07, 2008.

+

check_postgres.pl is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of End Point Corporation and is BSD-licensed. The latest version is 2.3.2, and was released on October 08, 2008.

The latest development version can be downloaded via git: