From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Joseph Conway <mail(at)joeconway(dot)com> |
Cc: | Michael Wood <esiotrot(at)gmail(dot)com>, Michael Rowan <mike(dot)rowan(at)internode(dot)on(dot)net>, postgresql novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: How to remove quotes from COPY TO result? |
Date: | 2010-08-10 15:00:00 |
Message-ID: | 201008101500.o7AF00Z07566@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Joseph Conway wrote:
> On 8/10/10 2:58 AM, Michael Wood wrote:
> > On 10 August 2010 00:53, Bruce Momjian <bruce(at)momjian(dot)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 ;-)
Oh, I see the CSV now. I was confused. Sorry. I was not aware you
could change the delimiter in CSV.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Campbell | 2010-08-10 17:42:16 | Listing Schemas - Revisited |
Previous Message | Joseph Conway | 2010-08-10 14:57:56 | Re: How to remove quotes from COPY TO result? |