Re: Alternative to \copy in psql modelled after \g

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Daniel Verite" <daniel@manitou-mail.org>
Cc: "Fabien COELHO" <coelho@cri.ensmp.fr>, "Alvaro Herrera" <alvherre@2ndquadrant.com>, "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>, "David G. Johnston" <david.g.johnston@gmail.com>
Date: 2019-01-28T15:31:25Z
Lists: pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> 	Tom Lane wrote:
>> A variant that might or might not be safer is "\g <foo", ie we
>> insist on you putting a mark there that shows you intended to read.

> I haven't written any patch yet, but I was thinking of submitting
> something like that, with the addition of "\g >foo" as a synonym of
> "\g foo" for the symmetry with "<".

+1, the same had occurred to me.

			regards, tom lane


Commits

  1. Fix psql's "\g target" meta-command to work with COPY TO STDOUT.