Re: join problem...

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: riki <riki_fox(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: join problem...
Date: 2007-01-10 15:41:19
Message-ID: 20070110154119.GA7663@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 10, 2007 at 04:34:00PM +0100, riki wrote:
> Hi,
>
> i'm trying to extract some info from system catalog tables.
> documentation says that i should join columns of different data type.
> that is int2[] with int2, array with integer.
> how can i make this join work?

You can use the ANY() operator for this:

# select 1 = ANY( ARRAY[2,3,4] );
?column?
----------
f
(1 row)

# select 2 = ANY( ARRAY[2,3,4] );
?column?
----------
t
(1 row)

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Dale 2007-01-10 15:51:57 Recording insert, updates, and deletes
Previous Message riki 2007-01-10 15:34:00 join problem...