Question with combining ANY with ilike

From: Rusty Conover <rconover(at)infogears(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Question with combining ANY with ilike
Date: 2008-12-12 06:58:03
Message-ID: B7C0BF05-CEDB-420F-A6F1-A996DA6B8BA3@infogears.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi PostgreSQL,

I'd like to specify a pattern then apply that pattern to match each
element of an array:

rconover=# select 'foobar%' ~~ ANY (ARRAY['bar', 'cat', 'foobar:asdf']);
?column?
----------
f
(1 row)

I'd like the the pattern would be evaluated against all of the array
elements, but the order of parameters for the ~~ operator when
combined with the ANY command is backwards to what I need.

Do you how I can make it work so that I could write a pattern and
match it against the array elements using the ANY command?

Thanks,

Rusty
--
Rusty Conover
rconover(at)infogears(dot)com
InfoGears Inc / GearBuyer.com / FootwearBuyer.com
http://www.infogears.com
http://www.gearbuyer.com
http://www.footwearbuyer.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2008-12-12 07:12:08 Re: [GENERAL] Tool to converter plsql in pgplsql
Previous Message Phillip Berry 2008-12-12 00:29:25 Re: Startup process thrashing