From: | Sebastian P(dot) Luque <spluque(at)gmail(dot)com> |
---|---|
To: | Ben Morrow <ben(at)morrow(dot)me(dot)uk> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: \copy multiline |
Date: | 2012-11-29 15:31:10 |
Message-ID: | 87boego281.fsf@kolob.subpolar.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Thu, 29 Nov 2012 08:01:31 +0000,
Ben Morrow <ben(at)morrow(dot)me(dot)uk> wrote:
> Quoth spluque(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Sebastian P. Luque | 2012-11-29 15:35:13 | Re: \copy multiline |
Previous Message | Rob Sargentg | 2012-11-29 13:10:51 | Re: \copy multiline |