diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-03-13 13:49:03 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-03-13 13:49:03 -0400 |
commit | f70a78bc1f5556546d809a8164b9ba6a907f266f (patch) | |
tree | c1c76fbe6024efd57cdca5a9ee98043dea31cfd9 /src/bin/psql/copy.h | |
parent | 7bae0284eeb0863220260e0d5ac80f0b37053690 (diff) |
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
Diffstat (limited to 'src/bin/psql/copy.h')
-rw-r--r-- | src/bin/psql/copy.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/psql/copy.h b/src/bin/psql/copy.h index ec1f0d09a9a..2c71da00603 100644 --- a/src/bin/psql/copy.h +++ b/src/bin/psql/copy.h @@ -12,11 +12,13 @@ /* handler for \copy */ -bool do_copy(const char *args); +extern bool do_copy(const char *args); /* lower level processors for copy in/out streams */ -bool handleCopyOut(PGconn *conn, FILE *copystream); -bool handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary); +extern bool handleCopyOut(PGconn *conn, FILE *copystream, + PGresult **res); +extern bool handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, + PGresult **res); #endif |