how to escape _ in select

Поиск
Список
Период
Сортировка
От Wes James
Тема how to escape _ in select
Дата
Msg-id AANLkTi=7K_xTEQSFaOX3=K_YDiNjvDedjcfBSTRpO240@mail.gmail.com
обсуждение исходный текст
Ответы Re: how to escape _ in select  (Justin Graf <justin@magwerks.com>)
Re: how to escape _ in select  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: how to escape _ in select  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-sql
I'm trying to do this:

select * from table where field::text ilike '%\_%';

but it doesn't work.

How do you escape the _ and $ chars?

The docs say to use \, but that isn't working.

( http://www.postgresql.org/docs/8.3/static/functions-matching.html )

The text between '%...%' can be longer, I'm just trying to figure out
how to escape some things.  I've found that ' works with '' and \
works with \\

thx,

-wes


В списке pgsql-sql по дате отправления:

Предыдущее
От: Torsten Zühlsdorff
Дата:
Сообщение: Re: [TRIGGER] Returning values from BEFORE UPDATE trigger, without using them
Следующее
От: Justin Graf
Дата:
Сообщение: Re: how to escape _ in select