| От | Tom Lane |
|---|---|
| Тема | Re: Using backslash in query |
| Дата | |
| Msg-id | 19903.1065195244@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Using backslash in query (Michael Brusser <michael@synchronicity.com>) |
| Ответы |
Re: Using backslash in query
|
| Список | pgsql-hackers |
Michael Brusser <michael@synchronicity.com> writes:
> But when I doubled the number of backslashes:
> SELECT smth. FROM tbl WHERE situation LIKE '%\\\\%';
> - it actually worked fine.
Backslash is special to both the string-literal parser and the LIKE code.
So when you write the above, the pattern value that arrives at the LIKE
processor has one less level of backslashing:%\\%
and the LIKE processor interprets this as percent, a literal backslash,
and another percent.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера