Re: Weird behaviour of = ANY ( SUBQUERY ) ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird behaviour of = ANY ( SUBQUERY ) ?
Дата
Msg-id 14055.1254319091@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Weird behaviour of = ANY ( SUBQUERY ) ?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-bugs
hubert depesz lubaczewski <depesz@depesz.com> writes:
> Why this doesn't work:

> # SELECT 1 = ANY( ( SELECT '{1,2}'::int4[]) );
> ERROR:  operator does not exist: integer = integer[]
> LINE 1: SELECT 1 = ANY( ( SELECT '{1,2}'::int4[]) );
>                  ^

Why would you expect it to work?  The datatypes aren't compatible.

> direct usage of array of course works:
> # select 1 = any ( '{1,2}'::int4[] );

ANY with a sub-SELECT and ANY without one are two completely different
things.

            regards, tom lane

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

Предыдущее
От: "Edinei"
Дата:
Сообщение: BUG #5090: erro
Следующее
От: Isaac Morland
Дата:
Сообщение: Bus Error in psql command history