From: Bath, David <dave.bath@unix.net>
To: pgsql-sql@postgresql.org
Subject: Lead and tail quotes with \pset fieldsep
Date: Mon, 20 Mar 2006 10:37:07 +1100
Message-ID: <200603201037.07638.dave.bath@unix.net> (raw)
Folks
If I want psql to generate CSV files fully-double-quoted I can
use pset as follows
psql> \pset fieldsep ","
However this does not put a quote before the first field and
after the last, so each row comes out as
1234","blahblah","sdfgsg","foo","bar
Is there a way to use psql to give rows like
1234","blahblah","sdfgsg","foo","bar
or is there another tool I should use.
COPY doesn't deal with views and restrictions well so it is
not an option.
Thanks in advance
--
David T. Bath
dave.bath@unix.net
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: dave.bath@unix.net
Subject: Re: Lead and tail quotes with \pset fieldsep
In-Reply-To: <200603201037.07638.dave.bath@unix.net>
* 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