DBI 1.37, DBD::Pg 1.31, Perl 5.8.1, PG 7.4.0, Linux.

CREATE TABLE t1 (id BYTEA NOT NULL PRIMARY KEY);

I can't seem to insert a NUL-containing string to a BYTEA PK column. The string is treated as NUL-terminated so that "123\0001" and "123\0002" are treated as duplicates.

I can insert these strings fine though using psql, using:

INSERT INTO t1 VALUES ('123\\0001');
INSERT INTO t1 VALUES ('123\\0002');

Any solution?

--
dave



Reply via email to