Re: How to remove quotes from COPY TO result? - Mailing list pgsql-novice

From Joseph Conway
Subject Re: How to remove quotes from COPY TO result?
Date
Msg-id 4C6168F4.40008@joeconway.com
Whole thread Raw
In response to Re: How to remove quotes from COPY TO result?  (Michael Wood <esiotrot@gmail.com>)
Responses Re: How to remove quotes from COPY TO result?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-novice
On 8/10/10 2:58 AM, Michael Wood wrote:
> On 10 August 2010 00:53, Bruce Momjian <bruce@momjian.us> wrote:
>> Joe Conway wrote:
>>> COPY abbreviation FROM 'filename' WITH DELIMITER '\t' CSV;
>>> select * from abbreviation;
>>>  id | full_name | short_name
>>> ----+-----------+------------
>>>   1 | STREET    | ST
>>>   2 | ROAD      | RD
>>> (2 rows)
>>
>> How were the double-quotes removed?
>
> Doesn't the "WITH ... CSV" handle that automatically?

Yes

> The documentation implies to me that quotes would be stripped,
> although it talks more about writing CSV files than reading them.  I
> haven't tried it, though.

It works -- I tried it myself before I posted ;-)

Joe

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support


pgsql-novice by date:

Previous
From: Michael Wood
Date:
Subject: Re: How to remove quotes from COPY TO result?
Next
From: Bruce Momjian
Date:
Subject: Re: How to remove quotes from COPY TO result?