Re: " " around fields with psql

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Steve Clark <sclark(at)netwolves(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: " " around fields with psql
Date: 2012-02-10 19:12:52
Message-ID: CAOR=d=2VmiHCZVsPL5WZYtY=taz=tzNch+3a5bqAGC7XQ1z-dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 10, 2012 at 11:26 AM, Steve Clark <sclark(at)netwolves(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2012-02-10 19:19:36 Re: Strategy for Primary Key Generation When Populating Table
Previous Message Steve Clark 2012-02-10 18:26:23 " " around fields with psql