pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: Emil Kaffeshop <emildg@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Arrya variable as argument to IN expression
Date: Thu, 17 Nov 2005 11:51:31 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <20051117082851.65703.qmail@web32704.mail.mud.yahoo.com>

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




view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, emildg@yahoo.com
  Subject: Re: Arrya variable as argument to IN expression
  In-Reply-To: <Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.com>
  References: <20051117082851.65703.qmail@web32704.mail.mud.yahoo.com> <Pine.LNX.4.44.0511171150050.7887-100000@matrix.gatewaynet.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