seiliki wrote:
The data types of tableout.c1 and tablein.c1 are both bytea.
[...]
However, I get the following errors from log when calling
libpq functions PQputCopyData() and PQputCopyEnd().
2010-03-06 20:47:42 CST ERROR: invalid byte sequence for encoding UTF8:
0x00
[...]
When
seiliki wrote:
The data types of tableout.c1 and tablein.c1 are both bytea.
I first export tableout.c1 to a file:
db1=# COPY (SELECT c1 FROM tableout LIMIT 1) TO '/tmp/t';
Then I try to import the file to another table.
This works without flaw:
db1=# COPY tablein FROM '/tmp/t';
The data types of tableout.c1 and tablein.c1 are both bytea.
I first export tableout.c1 to a file:
db1=# COPY (SELECT c1 FROM tableout LIMIT 1) TO '/tmp/t';
Then I try to import the file to another table.
This works without flaw:
db1=# COPY tablein FROM '/tmp/t';
What I can't understand is why PQputCopyData() encodes incoming character
string, which was exported by COPY ... TO '/tmp/t' SQL command under psql
prompt, for bytea columns and refuse to accept or misinterpret zero value.
As far as PQputCopyData() is concerned, server and/or client does not
Hi!
The data types of tableout.c1 and tablein.c1 are both bytea. I first export
tableout.c1 to a file:
db1=# COPY (SELECT c1 FROM tableout LIMIT 1) TO '/tmp/t';
Then I try to import the file to another table.
This works without flaw:
db1=# COPY tablein FROM '/tmp/t';
However, I get the