pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Seb <spluque@gmail.com>
To: pgsql-sql@postgresql.org
Subject: \copy multiline
Date: Wed, 28 Nov 2012 21:21:32 -0600
Message-ID: <87r4ndnlfn.fsf@kolob.subpolar.dyndns.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Hi,

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?

Cheers,

-- 
Seb


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (5+ messages)  latest in thread

Message-ID: <87r4ndnlfn.fsf@kolob.subpolar.dyndns.org>
Permalink:  ../87r4ndnlfn.fsf@kolob.subpolar.dyndns.org/
Also on:    postgresql.org/message-id/87r4ndnlfn.fsf@kolob.subpolar.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: spluque@gmail.com
  Subject: Re: \copy multiline
  In-Reply-To: <87r4ndnlfn.fsf@kolob.subpolar.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox