BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work - Mailing list pgsql-bugs

From maxim.boguk@gmail.com
Subject BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Date
Msg-id E1RXOP2-0002iJ-WB@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
List pgsql-bugs
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?

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #6325: Useless Index updates
Next
From: Tom Lane
Date:
Subject: Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work