Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support? - Mailing list pgsql-sql

From Tom Lane
Subject Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?
Date
Msg-id 16967.1314717876@sss.pgh.pa.us
Whole thread Raw
In response to where col1 not ilike ('str1%', 'str2%'... 'strN%') support?  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?
List pgsql-sql
Emi Lu <emilu@encs.concordia.ca> writes:
> Does psql provide something like the following query command?

> select * from tablename
> where col1 not ilike ('str1%', 'str2%'... 'strN%')

If you remember the operator name equivalent to ILIKE (~~*)
you can do

select * from tablename
where not (col1 ~~* any(array['str1%', 'str2%'... 'strN%']));
        regards, tom lane


pgsql-sql by date:

Previous
From: Julien Cigar
Date:
Subject: Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?
Next
From: Emi Lu
Date:
Subject: Re: where col1 not ilike ('str1%', 'str2%'... 'strN%') support?