From 7d628cfba25cbd973e3a6489008c0f52624fbb55 Mon Sep 17 00:00:00 2001 From: Guillaume Lelarge Date: Wed, 7 Apr 2010 13:52:43 -0400 Subject: Always use ENV{PGSERVICE} to prevent issues with "service=" Signed-off-by: Greg Sabino Mullane --- check_postgres.pl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 1f708baae..d7bb3d7b0 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1786,12 +1786,7 @@ sub run_command { my @args = ('-q', '-t'); if (defined $db->{dbservice} and length $db->{dbservice}) { ## XX Check for simple names $db->{pname} = "service=$db->{dbservice}"; - if ($psql_version >= 8.3) { - push @args, qq{service=$db->{dbservice}}; - } - else { - $ENV{PGSERVICE} = $db->{dbservice}; - } + $ENV{PGSERVICE} = $db->{dbservice}; } else { $db->{pname} = "port=$db->{port} host=$db->{host} db=$db->{dbname} user=$db->{dbuser}"; @@ -8456,6 +8451,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =item B + Use $ENV{PGSERVICE} instead of "service=" to prevent problems (Guillaume Lelarge) Add --man option to show the entire manual. (Andy Lester) Redo the internal run_command() sub to use -x and hashes instead of regexes. Fix error in custom logic (Andreas Mager) -- cgit v1.2.3