I am having a table in Hsql DB which now I am migrating to Postgres.
For this I export a CSV (using SQLSquirrel) from Hsql and import into Postgres using the COPY..FROM postgres command.
I have an attribute of Type VARBINARY
in the hsql table (lets call it "attr1"), which in Postgres table becomes Type bytea
.
Suppose one row has the value of attr1 as \x00
in the hsqldb. The exported CSV contains the value as 00
. But after importing it into Postgres it gets converted to \x3030
(when viewed in hex format).
For importing CSV into Postgres I use the command as :\COPY <tablename> FROM 'Data.csv' DELIMITER ',' CSV HEADER;
What am I missing ? How can I solve this ?