Search Postgresql Archives

Escape string for LIKE op

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

 



How can I escape a string for LIKE operations?

I want to do:

SELECT * FROM t WHERE a LIKE b || '%'

But I want be to interpreted literally.  If b is 'The 7% Solution', I
don't want that '%' to be wildcard.  I can't find an appropriate
function to escape it and any other potential wildcards for LIKE
clauses.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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