Re: " " around fields with psql - Mailing list pgsql-general

From Scott Marlowe
Subject Re: " " around fields with psql
Date
Msg-id CAOR=d=2VmiHCZVsPL5WZYtY=taz=tzNch+3a5bqAGC7XQ1z-dg@mail.gmail.com
Whole thread Raw
In response to " " around fields with psql  (Steve Clark <sclark@netwolves.com>)
Responses Re: " " around fields with psql
List pgsql-general
On Fri, Feb 10, 2012 at 11:26 AM, Steve Clark <sclark@netwolves.com> wrote:
> Hello,
>
> Is there a way with psql to get column output to be
> "data1","data2",...,"datan"
>
> I tried -F "," but that left off the first and last quote.
>
> I can't seem to find a way in the man page.

Well, you can do it yourself kinda like this:

select '""||field1||'", "||field2||'" from sometable where yada.

pgsql-general by date:

Previous
From: Steve Clark
Date:
Subject: " " around fields with psql
Next
From: David Johnston
Date:
Subject: Re: Strategy for Primary Key Generation When Populating Table