Re: IN and ANY - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: IN and ANY
Date
Msg-id Pine.LNX.4.44.0403022138160.13979-100000@zigo.dhs.org
Whole thread Raw
In response to Re: IN and ANY  (Joe Conway <mail@joeconway.com>)
Responses Re: IN and ANY  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
On Tue, 2 Mar 2004, Joe Conway wrote:

> regression=# select 1 where array[1] in (array[1]);
>   ?column?
> ----------
>          1
> (1 row)
> 
> regression=# select 1 where array[1] in (array[1,2]);
>   ?column?
> ----------
> (0 rows)

The only reason I brought it up was that to me ANY and IN are pretty much
the same kind of operator. Up until now I thought that IN really was the
same as =ANY, but it isn't. I don't like that but of course I have to
accept it. I would rather have had some elem function/operator for arrays
like:
 1 ELEM IN array[1,2]

or
 1 = ANY ELEM arra[1,2]

But as usual I'm 6 months late with my objections :-)

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: simple make check failures
Next
From: Joe Conway
Date:
Subject: Re: IN and ANY