From: | "Thomas H(dot)" <me(at)alternize(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | 8.3b2: problem using "COPY ... TO/FROM .... BINARY" |
Date: | 2007-11-17 19:45:00 |
Message-ID: | 473F44BC.2050405@alternize.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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".
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-17 19:51:43 | Re: 8.3b2: problem using "COPY ... TO/FROM .... BINARY" |
Previous Message | Tom Lane | 2007-11-17 16:17:36 | Re: Start up error |