COPY and double-quote-separated fields - Mailing list pgsql-general

From Ron Johnson
Subject COPY and double-quote-separated fields
Date
Msg-id 1059896211.24817.129.camel@haggis
Whole thread Raw
Responses Re: COPY and double-quote-separated fields
List pgsql-general
Hi,

PostgreSQL 7.3.3 on i386-pc-linux-gnu, compiled by GCC gcc
(GCC) 3.3 (Debian)

I must load a file in which each field in each row is contained
in double quotes, i.e.
"1","foo"
"2","bar"
"3","puddle"

test1=# copy foo from '/usr/local/data/zip/foo.unl';
ERROR:  copy: line 1, pg_atoi: error in ""1","foo"": can't parse
""1","foo""

I have a very large dataset (14.3GiB in 22 files) that has such
a format, and would prefer not to sed each one of them, creating
new files in the process.

Any suggestions?

Many TIA
--
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+



pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Inheritance & multiple-value fields
Next
From: Jason Godden
Date:
Subject: Re: COPY and double-quote-separated fields