postgresql/src
Tom Lane cda1e27fb7 Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
Previously, \g would successfully execute the COPY command, but
the target specification if any was ignored, so that the data was
always dumped to the regular query output target.  This seems like
a clear bug, so let's not just fix it but back-patch it.

While at it, adjust the documentation for \copy to recommend
"COPY ... TO STDOUT \g foo" as a plausible alternative.

Back-patch to 9.5.  The problem exists much further back, but the
code associated with \g was refactored enough in 9.5 that we'd
need a significantly different patch for 9.4, and it doesn't
seem worth the trouble.

Daniel Vérité, reviewed by Fabien Coelho

Discussion: https://postgr.es/m/15dadc39-e050-4d46-956b-dcc4ed098753@manitou-mail.org
2019-01-26 14:15:42 -05:00
..
backend Allow UNLISTEN in hot-standby mode. 2019-01-25 21:14:31 -05:00
bin Fix psql's "\g target" meta-command to work with COPY TO STDOUT. 2019-01-26 14:15:42 -05:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:35 -05:00
include Fix misc typos in comments. 2019-01-23 13:46:51 +02:00
interfaces Remove infinite-loop hazards in ecpg test suite. 2019-01-24 16:46:56 -05:00
makefiles Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
pl Fix misc typos in comments. 2019-01-23 13:46:51 +02:00
port Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Allow UNLISTEN in hot-standby mode. 2019-01-25 21:14:31 -05:00
timezone Sync our copy of the timezone library with IANA release tzcode2018g. 2018-10-31 09:48:19 -04:00
tools Revert "Add valgrind suppressions for wcsrtombs optimizations" 2019-01-19 20:41:48 +01:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in fix typo 2019-01-13 16:44:24 -05:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00