1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

psql: Support multiple -c and -f options, and allow mixing them.

To support this, we must reconcile some historical anomalies in the
behavior of -c.  In particular, as a backward-incompatibility, -c no
longer implies --no-psqlrc.

Pavel Stehule (code) and Catalin Iacob (documentation).  Review by
Michael Paquier and myself.  Proposed behavior per Tom Lane.
This commit is contained in:
Robert Haas
2015-12-08 14:04:08 -05:00
parent 385f337c9f
commit d5563d7df9
5 changed files with 202 additions and 132 deletions

View File

@ -400,7 +400,7 @@ sub poll_query_until
while ($attempts < $max_attempts)
{
my $cmd =
[ 'psql', '-At', '-c', $query, '-d', $self->connstr($dbname) ];
[ 'psql', '-XAt', '-c', $query, '-d', $self->connstr($dbname) ];
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
chomp($stdout);