backslashes in queries containing LIKE - Mailing list pgsql-general

From Mickael Faivre-Macon
Subject backslashes in queries containing LIKE
Date
Msg-id f132f7e30501260544197a9e1d@mail.gmail.com
Whole thread Raw
Responses Re: backslashes in queries containing LIKE  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Hi,

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

Why is postgres behaves like that ?
Can someone help us ?

Scripts for testing purpose have been attached.

Mickael Faivre-Macon.

Attachment

pgsql-general by date:

Previous
From: "Carlos Oliva"
Date:
Subject: Re: Size of data stored in bytea record?
Next
From: "Frank D. Engel, Jr."
Date:
Subject: Re: Extended unit