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)
Список
Дерево обсуждения
Weird behaviour of = ANY ( SUBQUERY ) ? hubert depesz lubaczewski <depesz@depesz.com>
Re: Weird behaviour of = ANY ( SUBQUERY ) ? Tom Lane <tgl@sss.pgh.pa.us>
hubert depesz lubaczewski  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
Дата:
FAQ