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

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr>,"Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com>,"PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>,"David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Alternative to \copy in psql modelled after \g
Date: 2019-01-28 16:01:40
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:

> > Now as far as I can see, there is nothing that \copy to file or program
> > can do that COPY TO STDOUT cannot do.
> I don't think there's a way to get the effect of "\copy to pstdout"
> (which, IIRC without any caffeine, means write to psql's stdout regardless
> of where queryFout is currently pointing).

\g /dev/stdout would work already on systems like Linux that provide
this alias.
Otherwise "\g -" looks good as a portable solution.

Best regards,
Daniel Vérité
PostgreSQL-powered mailer:
Twitter: @DanielVerite

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-01-28 16:14:58 Re: ATTACH/DETACH PARTITION CONCURRENTLY
Previous Message Heikki Linnakangas 2019-01-28 15:31:56 Re: Making all nbtree entries unique by having heap TIDs participate in comparisons