Re: inconsistent functionality with LIKE operator

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: inconsistent functionality with LIKE operator
Дата
Msg-id 22657.985884223@sss.pgh.pa.us
обсуждение исходный текст
Ответ на inconsistent functionality with LIKE operator  (Phuong Ma <pma@commandprompt.com>)
Список pgsql-sql
Phuong Ma <pma@commandprompt.com> writes:
> I'm using PostgreSQL version 7.1, and I'm having trouble with the LIKE
> statement.  How would I find the value "a\bc"?  I tried using the
> backslash to escape it: LIKE 'a\\b%';

I think you need four backslashes.  The string-literal parser eats one
level of backslashes, but you need the pattern that arrives at LIKE
to look like "a\\b%".

BTW, "PostgreSQL version 7.1" does not exist yet.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Calling Java from psql (was Re: requesting help)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Calling Java from psql (was Re: requesting help)