Re: BUG #5535: Backslash in condition for LIKE statement is not seen

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #5535: Backslash in condition for LIKE statement is not seen
Дата
Msg-id 4C2CB5A00200002500032F43@gw.wicourts.gov
обсуждение исходный текст
Ответ на BUG #5535: Backslash in condition for LIKE statement is not seen  ("Jeff Benjamin" <jeff@ivertex.com>)
Ответы Re: BUG #5535: Backslash in condition for LIKE statement is not seen  (Jeff Benjamin <jeff@ivertex.com>)
Список pgsql-bugs
"Jeff Benjamin" <jeff@ivertex.com> wrote:

> Seems one cannot use a backslash character in a LIKE condition.

By default that has special meaning as an escape character.

Try this:

select * from test where pattern like E'\\w%' escape '#';

or this:

select * from test where pattern like E'\\\\w%';

-Kevin

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

Предыдущее
От: "Jeff Benjamin"
Дата:
Сообщение: BUG #5535: Backslash in condition for LIKE statement is not seen
Следующее
От: Jeff Benjamin
Дата:
Сообщение: Re: BUG #5535: Backslash in condition for LIKE statement is not seen