]> granicus.if.org Git - postgresql/commit - src/bin/psql/common.c
Allow psql to print COPY command status in more cases.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Mar 2014 17:49:03 +0000 (13:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Mar 2014 17:49:03 +0000 (13:49 -0400)
commitf70a78bc1f5556546d809a8164b9ba6a907f266f
treec1c76fbe6024efd57cdca5a9ee98043dea31cfd9
parent7bae0284eeb0863220260e0d5ac80f0b37053690
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
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/common.c
src/bin/psql/copy.c
src/bin/psql/copy.h