Re: Alternative to \copy in psql modelled after \g
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-09T16:16:16Z
Lists: pgsql-hackers
On Fri, Nov 9, 2018 at 4:19 AM Daniel Verite <daniel@manitou-mail.org> wrote: > Examples of use > > 1. $ psql -v filename="/path/data-$(date -I).csv" > COPY (SELECT * > FROM table > WHERE ...) > TO STDOUT (FORMAT csv) \copyto :filename Do I understand correctly that you are proposing a slightly less verbose alternative of: \o :filename COPY TO STDOUT \o David J.
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