Re: LIKE operator and string comparison

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LIKE operator and string comparison
Дата
Msg-id 19719.1095895248@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LIKE operator and string comparison  (Wei Weng <wweng@kencast.com>)
Список pgsql-sql
Wei Weng <wweng@kencast.com> writes:
> What about in regular strings? I do need to use backslash to escape the 
> other backslash in order to get the '\'. Why isn't that the case in LIKE 
> operation?

It is.  You write four backslashes in order to describe a string
constant value containing two backslashes.  When the LIKE code sees
that, it interprets it as one quoted backslash.

See LIKE ... ESCAPE if you'd like to use a different escape character
in the LIKE pattern.
        regards, tom lane


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

Предыдущее
От: Wei Weng
Дата:
Сообщение: Re: LIKE operator and string comparison
Следующее
От: Kemin Zhou
Дата:
Сообщение: plpgsql syntax