Re: sql: "LIKE" problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sql: "LIKE" problem
Дата
Msg-id 6086.1110785532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на sql: "LIKE" problem  ("Her Goo" <gu_he@msn.com>)
Список pgsql-sql
"Her Goo" <gu_he@msn.com> writes:
> I want to go a step further, and  restrict the results to those 
> that begin with string "abc\d".

You need four backslashes for that, because \ is special to both
the string literal parser and the LIKE operator.  So '\\\\'
reduces to a string constant containing \\, and then the LIKE
operator sees that as a quoted backslash.
        regards, tom lane


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

Предыдущее
От: pginfo
Дата:
Сообщение: lower and unicode
Следующее
От: Miroslav Šulc
Дата:
Сообщение: Re: lower and unicode