pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: Rui Carvalho <rui.hmcarvalho@gmail.com>
Cc: ramasubramanian <ramasubramanian.g@renaissance-it.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Array comparison
Date: Fri, 8 Jan 2010 11:36:04 -0500
Message-ID: <b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com> (raw)
In-Reply-To: <4cb7e1b21001080806o443d6e2bxbccc2f6b820395d3@mail.gmail.com>
References: <a222cb861001062021l3f29bdc6kb19a3970089b40ae@mail.gmail.com>
	<10E4D065260941509531A32BDC0AB647@ramasubramanian>
	<4cb7e1b21001080806o443d6e2bxbccc2f6b820395d3@mail.gmail.com>

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



view thread (3+ messages)

Message-ID: <b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com>
Permalink:  ../b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mmoncure@gmail.com, rui.hmcarvalho@gmail.com, ramasubramanian.g@renaissance-it.com
  Subject: Re: Array comparison
  In-Reply-To: <b42b73151001080836h1bc7faddk9bf62816c252d507@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox