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

Can not match 0 on bytea

From: seiliki(at)so-net(dot)net(dot)tw
To: pgsql-general(at)postgresql(dot)org
Subject: Can not match 0 on bytea
Date: 2010-02-27 09:05:42
Message-ID: 20100227090548.78807F4809C@m5.so-net.net.tw (view raw or flat)
Thread:
Lists: pgsql-general
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".

Responses

pgsql-general by date

Next:From: seilikiDate: 2010-02-27 09:17:38
Subject: regexp_replace: LF, CR, or tab
Previous:From: Greg SmithDate: 2010-02-27 08:25:42
Subject: Re: Automatic index advisor?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group