Call psql with option -X
authorPeter Eisentraut <[email protected]>
Sat, 30 Jan 2016 23:11:16 +0000 (18:11 -0500)
committerChristoph Berg <[email protected]>
Thu, 26 May 2016 12:03:16 +0000 (14:03 +0200)
Starting in PostgreSQL 9.6, psql -c no longer implies -X, so it has to
be added explicitly in order to avoid customizations in .psqlrc
interfering with the output parsing.

check_postgres.pl

index 178fb3763011da921629c42d620075b201d59ff7..b0433f6a125a1076c13ba9e56933b6a85bdf5870 100755 (executable)
@@ -2524,7 +2524,7 @@ sub run_command {
         ## Store this target in the global target list
         push @{$info->{db}}, $db;
 
-        my @args = ('-q', '-t');
+        my @args = ('-X', '-q', '-t');
         if (defined $db->{dbservice} and length $db->{dbservice}) { ## XX Check for simple names
             $db->{pname} = "service=$db->{dbservice}";
             $ENV{PGSERVICE} = $db->{dbservice};