Wes James <compte...@gmail.com> writes:
> I'm trying to do this:
> select * from table where field::text ilike '%\_%';

> but it doesn't work.

You need to double the backslash, because one level of
backslash-escaping will be eaten by the string literal parser.
In the above example, the actual string value seen by ILIKE
is just %_%, so of course it doesn't do what you want.

                        regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to