errors using COPY from MySQL data - Mailing list pgsql-novice

From Doug Silver
Subject errors using COPY from MySQL data
Date
Msg-id 200304011639.53436.dsilver@urchin.com
Whole thread Raw
Responses Re: errors using COPY from MySQL data  (Josh Berkus <josh@agliodbs.com>)
List pgsql-novice
I'm sure this has been covered before, but I'm quickly getting frustrated
copying 100 lines at a time.  I did a data dump from a MySQL table, one of
the fields is a timestamp which it output as '20020816:23:44', so I changed
it to '20020816 23:44'.  But, I'm now consistently getting this error:

data=# copy data from '/tmp/data.1';
COPY
(I copy/paste 100 lines in from the original file)
data=# copy data from '/tmp/data.1';
ERROR:  copy: line 15, Bad timestamp external representation ''

(copy/paste the first 20 lines from the original, i.e. the same data just the
first 20 instead of all 100)

data=# copy data from '/tmp/data.1';
COPY

At first I was able to do 1000 lines at a time, but now it's down to 100 -- ok
that's not very scientific, but it doesn't matter if I delete line 15 (which
*looks* okay).  Note the second time it didn't complain at all about line 15.
Considering I have ~20000 entries, I'm going to need a lot of Snickers ... ;)

PostgreSQL 7.3.2

TIA

-doug


pgsql-novice by date:

Previous
From: Andrei Ivanov
Date:
Subject: Re: query help request [2x]
Next
From: Renê Salomão
Date:
Subject: Re: Postgres logs w/ Logrotate