Re: Bug #480: problem with LIKE pattern matches involving % and \_

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #480: problem with LIKE pattern matches involving % and \_
Дата
Msg-id 27774.1002910731@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug #480: problem with LIKE pattern matches involving % and \_  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
pgsql-bugs@postgresql.org writes:
> The following pattern matches do not work:

> LIKE '%\_%'
> LIKE '%\_'
> LIKE '\_%'

You are short a backslash: what the LIKE operator is seeing is just
%_%, etc, which naturally matches anything.  You gotta double the
backslashes, because one backslash will be eaten by the string-literal
parser.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Bug #480: problem with LIKE pattern matches involving
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug #477: path ?# path