BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work

From: maxim(dot)boguk(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Date: 2011-12-05 02:35:36
Message-ID: E1RXOP2-0002iJ-WB@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: 6326
Logged by: Maksym Boguk
Email address: maxim(dot)boguk(at)gmail(dot)com
PostgreSQL version: 9.1.1
Operating system: Linux
Description:

SELECT ARRAY(SELECT ...)
doesn't work when subselect return any array.

Test case:

db=# SELECT ARRAY(SELECT 1 UNION ALL SELECT 2);
?column?
----------
{1,2}

All good... now:

db=# 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=# 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?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-12-05 03:05:58 Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Previous Message Craig Ringer 2011-12-05 00:25:31 Re: BUG #6325: Useless Index updates