pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
@ 2019-01-26 19:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-01-26 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2c50c9f23d1dbb36b4fed50409ec590a0e9adaa2

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 +++++++++++++---
src/bin/psql/common.c          | 57 ++++++++++++++++++++++++++++++++++++------
src/bin/psql/copy.c            |  7 ++++--
3 files changed, 73 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
@ 2019-01-26 19:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-01-26 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e97a97b3206c18d155a925349b5f57052912509

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 +++++++++++++---
src/bin/psql/common.c          | 57 ++++++++++++++++++++++++++++++++++++------
src/bin/psql/copy.c            |  7 ++++--
3 files changed, 73 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
@ 2019-01-26 19:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-01-26 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cda1e27fb7064e499ea499776bad13036d9c4961

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 +++++++++++++---
src/bin/psql/common.c          | 57 ++++++++++++++++++++++++++++++++++++------
src/bin/psql/copy.c            |  7 ++++--
3 files changed, 73 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
@ 2019-01-26 19:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-01-26 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ae4c7d5ab88668275ab69913169564ce9bcbf27d

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 +++++++++++++---
src/bin/psql/common.c          | 57 ++++++++++++++++++++++++++++++++++++------
src/bin/psql/copy.c            |  7 ++++--
3 files changed, 73 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
@ 2019-01-26 19:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-01-26 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6d3ede5f1c654f923b2767b0b0c3b09569adaa18

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 +++++++++++++---
src/bin/psql/common.c          | 57 ++++++++++++++++++++++++++++++++++++------
src/bin/psql/copy.c            |  7 ++++--
3 files changed, 73 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-01-26 19:15 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-26 19:15 pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-26 19:15 pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-26 19:15 pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-26 19:15 pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT. Tom Lane <tgl@sss.pgh.pa.us>
2019-01-26 19:15 pgsql: Fix psql's "\g target" meta-command to work with COPY TO STDOUT. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox