Re: where column in ARRAY

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: where column in ARRAY
Date: 2008-10-22 13:16:11
Message-ID: 20081022151611.2463d220@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 22 Oct 2008 14:46:35 +0200
Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> wrote:

> Without building up a dynamic query is it possible to:
>
> create or replace function t1(a int[]) as
> $$
> ...
> select * from t1 where c in a; // eg in spite of in (1,2,3);
>
> or just obtain a similar effect?

tired rally tired... I didn't understand the example in the manual
where on the left side there is a constant and the column is the
array.
ANY works the other way around as well.

select * from t1 where c=any(a);

too much assembly language in my youth.

Sorry for the noise.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurent Wandrebeck 2008-10-22 13:26:49 Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4
Previous Message Ludovic Levesque 2008-10-22 13:04:19 Re: where column in ARRAY