Re: Alternative to \copy in psql modelled after \g - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: Alternative to \copy in psql modelled after \g
Date
Msg-id 3ac632c7-a82f-4c20-ba63-29c2d53d5728@manitou-mail.org
Whole thread Raw
In response to Re: Alternative to \copy in psql modelled after \g  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Alternative to \copy in psql modelled after \g
List 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: http://www.manitou-mail.org
Twitter: @DanielVerite


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons
Next
From: Robert Haas
Date:
Subject: Re: ATTACH/DETACH PARTITION CONCURRENTLY