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

From David G. Johnston
Subject Re: Alternative to \copy in psql modelled after \g
Date
Msg-id CAKFQuwa6V-2aNna4o+A1fYfiPZw5A-RWYNb=3YVUqeg1oq76cg@mail.gmail.com
Whole thread Raw
In response to Alternative to \copy in psql modelled after \g  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: Alternative to \copy in psql modelled after \g  ("Daniel Verite" <daniel@manitou-mail.org>)
List 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.


pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [HACKERS] Surjective functional indexes
Next
From: Alvaro Herrera
Date:
Subject: Re: notice processors for isolationtester