Search Postgresql Archives

Escape wildcard problems.

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

 



I read in the docs (section 9.7.1) that the backslash... \ ... is the default escape char to use in “like” expressions.  Yet when I try it, it doesn’t seem to work the ay I expect.  Here’s an example...

 

select name from templates where name like ‘%\_cont\_%’;

 

          name

----------------------------------

cgidvcontrol

x8idvcontrol

etc....

 

I would expect to NOT see these because the “cont” is not preceded by and followed by an underscore (because I escaped them with \).

 

Please advise.

 

Thanks

-dave

 


[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