hi there
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;
pgsql 8.3b2:
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:
447,883,0.0,1999-01-01 00:00:00,f
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
problems.
is this a bug or a feature? :)
- thomas
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".