Search Postgresql Archives

backslashes in queries containing LIKE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: creat_table.sql
Description: Binary data

Attachment: insert_values.sql
Description: Binary data

Attachment: select_values.sql
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux