Re: Arrya variable as argument to IN expression

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Emil Kaffeshop <emildg(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Arrya variable as argument to IN expression
Date: 2005-11-17 09:51:31
Message-ID: Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

O Emil Kaffeshop έγραψε στις Nov 17, 2005 :

> Hello I am trying the following:
> a INTEGER[] := ''{10,15,20}'';
> b INTEGER := 15;
> flag BOOLEAN := FALSE;
>
> SELECT b IN (a) INTO flag; !!! does not work

contrib/intarray and
SELECT intset(b) ~ a::int[] INTO flag;
are your friends.

>
> Is it legal to expect the array to be interpret as
> list of integers which IN expression takes ?
>
> Best Regards
> Emil kafegiiski
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

--
-Achilleus

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-11-17 14:23:37 Re: Arrya variable as argument to IN expression
Previous Message Andy Ballingall 2005-11-17 09:46:22 idea for a geographically distributed database: how best to implement?