The following bug has been logged on the website:
Bug reference: 6326
Logged by: Maksym Boguk
Email address: maxim.boguk@gmail.com
PostgreSQL version: 9.1.1
Operating system: Linux
Description:=20=20=20=20=20=20=20=20
SELECT ARRAY(SELECT ...)=20
doesn't work when subselect return any array.
Test case:
db=3D# SELECT ARRAY(SELECT 1 UNION ALL SELECT 2);
?column?
----------
{1,2}
All good... now:
db=3D# SELECT ARRAY(SELECT array[1,2]::float[] UNION ALL SELECT
array[3,4]::float[]);
ERROR: could not find array type for data type double precision[]
db=3D# SELECT ARRAY(SELECT array[1,2]::integer[] UNION ALL SELECT
array[3,4]::integer[]);
ERROR: could not find array type for data type integer[]
Is that syntax supposed to work with anyarray types?