Search Postgresql Archives

Re: How to use like with a list

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

 



BINGO !
Thanks :-)

-----Original Message-----
From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of John R Pierce
Sent: Friday, November 18, 2011 3:47 PM
To: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  How to use like with a list

On 11/18/11 12:37 PM, Gauthier, Dave wrote:
> bi_dev=# select name from test where name ~ '^(' || replace('jo,mo,do,fo', ',', '|') || ')l';
> ERROR:  argument of WHERE must be type boolean, not type text

ah, needs () around the right side of the ~ expression, not sure why.   
does ~ have higher expression priority than || or something?

	select name from test where name ~ ('^(' || replace(?, ',', '|') || ')l');

worked for me.



-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


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

-- 
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