diff options
author | Guillaume Lelarge | 2010-04-07 17:52:43 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2010-04-07 17:52:43 +0000 |
commit | 7d628cfba25cbd973e3a6489008c0f52624fbb55 (patch) | |
tree | a499f2f2d289b73d908eb04c90c9dccf72801ac5 /check_postgres.pl | |
parent | 20d4eba45dd995526a025d0433f34b138765c1f3 (diff) |
Always use ENV{PGSERVICE} to prevent issues with "service="
Signed-off-by: Greg Sabino Mullane <[email protected]>
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 8 |
1 files changed, 2 insertions, 6 deletions
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<Version 2.15.0> + 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) |