i'm not sure it its really a bug - the manual specifies that COPY ...
BINARY between different PGSQL versions might be problematic.
nevertheless: i've imported several tables from 8.2.5 to 8.3b2 without
any problems, until one table produced an error on a timestamp field:
from pgsql 8.2.5:
COPY "users"."ratings" TO '/temp/ratings' BINARY;
COPY "users"."ratings" FROM '/temp/ratings' BINARY;
2007-11-17 20:17:55 CET ERROR: timestamp out of range
2007-11-17 20:17:55 CET CONTEXT: COPY ratings, line 15081, column r_date
when using COPY ... CVS/TEXT; everything works. by using CVS output, i
was able do determine that the failing record is:
it seems to be the only timestamp that is failing, i've removed it from
the source table and was able to binary copy the remaining data without
is this a bug or a feature? :)
ps: is there a way to convert the binary file to plain sql to directly
check which record fails? i've tried to use pg_restore to read the file,
but it said "does not appear to be a valid archive".
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2007-11-17 19:51:43|
|Subject: Re: 8.3b2: problem using "COPY ... TO/FROM .... BINARY" |
|Previous:||From: Tom Lane||Date: 2007-11-17 16:17:36|
|Subject: Re: Start up error |