Re: Alternative to \copy in psql modelled after \g
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-09T16:35:00Z
Lists: pgsql-hackers
David G. Johnston wrote: > Do I understand correctly that you are proposing a slightly less > verbose alternative of: > > \o :filename > COPY TO STDOUT > \o Not strictly the same because of this: \o or \out [ filename ] .... “Query results” includes all tables, command responses, and notices obtained from the database server, as well as output of various backslash commands that query the database (such as \d); but not error messages. If for instance psql received a notification between the two \o it would end up in the file, which it wouldn't with \copyto. The same is true for SELECT... \g file as opposed to \o file Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
Commits
-
Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
- cda1e27fb706 9.5.16 landed
- ae4c7d5ab886 9.6.12 landed
- 8e97a97b3206 10.7 landed
- 6d3ede5f1c65 12.0 landed
- 2c50c9f23d1d 11.2 landed