From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "radoslav hodnicak" <rh(at)4096(dot)sk> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3438: Problem selecting backslash from a byte array |
Date: | 2007-07-11 17:05:30 |
Message-ID: | 27384.1184173530@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"radoslav hodnicak" <rh(at)4096(dot)sk> writes:
> create table backslashtest (test bytea null);
> insert into backslashtest values (E'\\134'::bytea);
> select * from backslashtest where test like E'\\134'::bytea;
Backslash is a special character to LIKE. Perhaps you would prefer
to specify another escape character, or none at all:
select * from backslashtest where test like E'\\134'::bytea escape '';
If you don't want any special pattern characters, why are you using
LIKE rather than plain = ?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | ISHIDA Akio | 2007-07-12 19:36:54 | BUG #3439: pg_standby and path name with space |
Previous Message | Pavel Stehule | 2007-07-11 16:28:47 | Re: BUG #3438: Problem selecting backslash from a byte array |