Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 895E3F3BB59 for ; Sun, 4 Dec 2011 22:35:53 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXOPG-0002N0-E1 for pgsql-bugs@postgresql.org; Mon, 05 Dec 2011 02:35:52 +0000 Received: from [204.145.120.229] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXOP3-0000wL-Bn for pgsql-bugs@postgresql.org; Mon, 05 Dec 2011 02:35:37 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RXOP2-0002iJ-WB for pgsql-bugs@postgresql.org; Mon, 05 Dec 2011 02:35:37 +0000 Date: Mon, 05 Dec 2011 02:35:36 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work To: pgsql-bugs@postgresql.org From: maxim.boguk@gmail.com X-Pg-Spam-Score: -2.2 (--) X-Archive-Number: 201112/36 X-Sequence-Number: 31847 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: = SELECT ARRAY(SELECT ...) = 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?