From: | sergey-1987(at)yandex(dot)ru |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #6690: ALL and ANY array operators |
Date: | 2012-06-13 11:54:49 |
Message-ID: | E1Sem9x-0006K6-CE@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 6690
Logged by: sergey
Email address: sergey-1987(at)yandex(dot)ru
PostgreSQL version: 9.1.2
Operating system: FreeBSD 8.1
Description:
As I see in documentation,
http://www.postgresql.org/docs/current/static/functions-aggregate.html there
is an ambiguity with bool_or aggregate and ANY array operator, so bool_or
cannot has standard name ANY. So ANY should always mean array operator. But
such query produces syntax error:
select 1 = ANY((select ARRAY[1, 2]::integer[]))
I.e. when I try to check is some element in array, that is calculated in
subquery, I cannot. I can use:
select ARRAY[1] && (select ARRAY[1, 2]::integer[])
but what about ANY operator?
For example this works:
select 1 = ANY(ARRAY[1, 2]::integer[]);
select 1 in (select * from unnest(ARRAY[1, 2]::integer[]))
From | Date | Subject | |
---|---|---|---|
Next Message | Andrzej Krawiec | 2012-06-13 12:50:09 | Re: BUG #6650: CPU system time utilization rising few times a day |
Previous Message | Dean Rasheed | 2012-06-13 07:11:55 | Re: Tab completion of function arguments not working in all cases |