Re: IN and ANY

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: IN and ANY
Дата
Msg-id 4044FFAB.5000001@joeconway.com
обсуждение исходный текст
Ответ на Re: IN and ANY  (Dennis Bjorklund <db@zigo.dhs.org>)
Ответы Re: IN and ANY  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: IN and ANY  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Dennis Bjorklund wrote:
> 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:

I wrestled with the same issue last year.

Offhand I don't know how hard it would be to do, but I wonder if when we 
see:
  argL IN (argR)

we might be able to determine if argL and argR are of the same type or 
if argR is an array of argL, and act accordingly.

But then we need to decide, what happens when we see:  argL IN (argR1, argR2, ...)
and argRn data type is an array of argL data type? Do we check all the 
argRn elements individually and return true if any of them equal argL? 
I'd guess so.

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

An uncanny ability ;-)

Joe


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: IN and ANY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: IN and ANY