Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Can not match 0 on bytea



Hi!

Data type of table1.c1 is bytea. That column stores binary data. The following matchings do not work. What is the right syntax?

TIA
CN
---------------
select c1 ~ E'\000' from table1;
select c1 LIKE E'%\000%' from table1;

ERROR:  invalid byte sequence for encoding "UTF8": 0x00
HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group