postgresql/src
Tom Lane 8e97a97b32 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:27 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Fix misc typos in comments. 2019-01-23 13:50:50 +02:00
interfaces Remove infinite-loop hazards in ecpg test suite. 2019-01-24 16:46:55 -05:00
makefiles Fix up confusion over how to use EXTRA_INSTALL. 2019-01-11 17:39:30 -05:00
pl Fix misc typos in comments. 2019-01-23 13:50:50 +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:08 -04:00
tools Revert "Add valgrind suppressions for wcsrtombs optimizations" 2019-01-19 20:45:31 +01:00
tutorial Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02: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 Build src/test/isolation during "make" and "make install". 2017-11-22 20:18:52 -08:00
Makefile.global.in fix typo 2019-01-13 16:44:05 -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