Re: Escape wildcard problems.

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: Escape wildcard problems.
Дата
Msg-id 200810240858.25492@hal.medialogik.com
обсуждение исходный текст
Ответ на Escape wildcard problems.  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: Escape wildcard problems.  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
On Friday 24 October 2008, "Gauthier, Dave" <dave.gauthier@intel.com> wrote:
> I read in the docs (section 9.7.1) that the backslash... \ ... is the
> default escape char to use in "like" expressions.  Yet when I try it, it
> doesn't seem to work the ay I expect.  Here's an example...
>
> select name from templates where name like '%\_cont\_%';
>

Use double \\ for underscores. I don't know why it's necessary, but it works
here.


--
Alan

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Escape wildcard problems.
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Escape wildcard problems.