View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 01:51 AM
=?koi8-r?Q?=F7=CC=C1=C4=C9=CD=C9=D2_=E2=C1=D2=C1=CE=CF=D7?=
 
Posts: n/a
Default COPY <table> FROM STDIN BINARY

Hi,

I have troubles with bulk insert of binary data via COPY command.

I use JDBC 3.0 driver patched by Kalle Hallivuori (http://kato.iki.fi/)
My table is:

create table bulk_data (
id integer, ts timestamp, ...
);

which I try to populate from Java app using COPY command:

copy bulk_data from stdin binary;

All integer, varchar and bytea values are copied correctly. But when I put into stream System.currentTimeMillis() as the timestamp value, that value is interpreted by PostgreSQL in a manner I could not understand; as the result I get wrong timestamp value in the table.

My question is: what input binary format of a timestamp value should I use?

Thanks a lot for any suggestions,

Vlad


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote