Re: \copy multiline - Mailing list pgsql-sql

From Sebastian P. Luque
Subject Re: \copy multiline
Date
Msg-id 87boego281.fsf@kolob.subpolar.dyndns.org
Whole thread Raw
In response to \copy multiline  (Seb <spluque@gmail.com>)
List pgsql-sql
On Thu, 29 Nov 2012 08:01:31 +0000,
Ben Morrow <ben@morrow.me.uk> wrote:

> Quoth spluque@gmail.com (Seb):
>> I use \copy to output tables into CSV files:

>> \copy (SELECT ...) TO 'a.csv' CSV

>> but for long and complex SELECT statements, it is cumbersome and
>> confusing to write everything in a single line, and multiline
>> statements don't seem to be accepted.  Is there an alternative, or am
>> I missing an continuation-character/option/variable that would allow
>> multiline statements in this case?

> CREATE TEMPORARY VIEW?

Of course, that's perfect.

Thanks!

-- 
Seb



pgsql-sql by date:

Previous
From: Rob Sargentg
Date:
Subject: Re: \copy multiline
Next
From: Sebastian P. Luque
Date:
Subject: Re: \copy multiline