Re: Array comparison - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Array comparison
Date
Msg-id b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com
Whole thread Raw
In response to Re: Array comparison  (Rui Carvalho <rui.hmcarvalho@gmail.com>)
List pgsql-performance
On Fri, Jan 8, 2010 at 11:06 AM, Rui Carvalho <rui.hmcarvalho@gmail.com> wrote:
> Hi
>
> well it's pretty simple
>
> if you want to see if there are elements in common then instead of "any" use
> "&&"
> if you want to see if they are equal just use " = " that will five you true
> or false

you also have the option of expanding the array into a set and using
standard query techniques.  w/8.4, you can use the built in
unnest()...for earlier versions you have to create it yourself
(trivially done):

http://archives.postgresql.org/pgsql-patches/2008-03/msg00308.php

merlin

pgsql-performance by date:

Previous
From: Rui Carvalho
Date:
Subject: Re: Array comparison
Next
From: "Carlo Stonebanks"
Date:
Subject: Re: Massive table (500M rows) update nightmare