Re: Arrays and LIKE

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Arrays and LIKE
Date: 2009-08-08 11:03:31
Message-ID: h5jm23$6t2$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-08-08, David <david(at)vanlaatum(dot)id(dot)au> wrote:
> Done a bit of hunting and can't seem to find an answer as to if this sort of thing is possible:
>
> SELECT * FROM mail WHERE recipients ILIKE 'david%';
>
> Where recipients is a VARCHAR(128)[]
>
> The above doesn't work but thats the sort of thing I want to do...
> If this is possible and can use an index as well that would be wonderful...

hmm tricky: you can't use any(recipients) ilike 'david%'

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2009-08-08 11:08:34 'a' = any( $${'a','x'} )
Previous Message sweta 2009-08-08 10:54:22 duplicate key violates unique constraint