| От | Michael Fuhr |
|---|---|
| Тема | Re: backslashes in queries containing LIKE |
| Дата | |
| Msg-id | 20050126161555.GA83314@winnie.fuhr.org обсуждение |
| Ответ на | backslashes in queries containing LIKE (Mickael Faivre-Macon <faivrem@gmail.com>) |
| Ответы |
Re: backslashes in queries containing LIKE
|
| Список | pgsql-general |
On Wed, Jan 26, 2005 at 02:44:40PM +0100, Mickael Faivre-Macon wrote:
> We have a problem with backslashes in queries containing LIKE.
>
> insert into table (field) values ('IM\\test')
> select * from table where field = 'IM\\test'
>
> returns one record
>
> select * from table where field LIKE 'IM\\%'
>
> returns no record
See the "Pattern Matching" section in the "Functions and Operators"
chapter of the documentation:
http://www.postgresql.org/docs/8.0/static/functions-matching.html
The documentation under "LIKE" discusses issues regarding the escape
character (the backslash by default).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера