COPY and double-quote-separated fields

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: COPY and double-quote-separated fields
Date: 2003-08-03 07:36:52
Message-ID: 1059896211.24817.129.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Godden 2003-08-03 11:08:36 Re: COPY and double-quote-separated fields
Previous Message Ron Johnson 2003-08-03 07:27:08 Re: Inheritance & multiple-value fields