pgsql: Allow psql to print COPY command status in more cases.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow psql to print COPY command status in more cases.
Date: 2014-03-13 17:49:11
Message-ID: E1WO9kl-0005ZK-SH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow psql to print COPY command status in more cases.

Previously, psql would print the "COPY nnn" command status only for COPY
commands executed server-side. Now it will print that for frontend copies
too (including \copy). However, we continue to suppress the command status
for COPY TO STDOUT, since in that case the copy data has been routed to the
same place that the command status would go, and there is a risk of the
status line being mistaken for another line of COPY data. Doing that would
break existing scripts, and it doesn't seem worth the benefit --- this case
seems fairly analogous to SELECT, for which we also suppress the command
status.

Kumar Rajeev Rastogi, with substantial review by Amit Khandekar

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f70a78bc1f5556546d809a8164b9ba6a907f266f

Modified Files
--------------
doc/src/sgml/ref/copy.sgml | 10 ++++++++
doc/src/sgml/ref/psql-ref.sgml | 38 ++++++++++++++---------------
src/bin/psql/common.c | 52 ++++++++++++++++++++++++++++------------
src/bin/psql/copy.c | 22 ++++++++---------
src/bin/psql/copy.h | 8 ++++---
5 files changed, 82 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-03-14 01:00:27 pgsql: Prevent interrupts while reporting non-ERROR elog messages.
Previous Message Tom Lane 2014-03-13 16:03:27 pgsql: Avoid transaction-commit race condition while receiving a NOTIFY