[GENERAL] Can not match 0 on bytea

2010-02-27 Thread seiliki
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

Re: [GENERAL] Can not match 0 on bytea

2010-02-27 Thread Daniel Verite
seil...@so-net.net.tw wrote: 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; selection

Re: [GENERAL] Can not match 0 on bytea

2010-02-27 Thread Tom Lane
seil...@so-net.net.tw writes: 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