Re: How to use like with a list
От | Gauthier, Dave |
---|---|
Тема | Re: How to use like with a list |
Дата | |
Msg-id | 482E80323A35A54498B8B70FF2B8798004D5FC885F@azsmsx504.amr.corp.intel.com обсуждение исходный текст |
Ответ на | Re: How to use like with a list (John R Pierce <pierce@hogranch.com>) |
Список | pgsql-general |
BINGO ! Thanks :-) -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce Sent: Friday, November 18, 2011 3:47 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] 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@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: