Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5E893186700B for ; Sun, 4 Dec 2011 23:40:24 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXPPg-0003JN-Dv for pgsql-bugs@postgresql.org; Mon, 05 Dec 2011 03:40:23 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pB53e68e023719; Sun, 4 Dec 2011 22:40:06 -0500 (EST) To: Maxim Boguk cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work In-reply-to: References: <23150.1323054358@sss.pgh.pa.us> Comments: In-reply-to Maxim Boguk message dated "Mon, 05 Dec 2011 14:25:17 +1100" Date: Sun, 04 Dec 2011 22:40:06 -0500 Message-ID: <23718.1323056406@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/39 X-Sequence-Number: 31850 Maxim Boguk writes: > PS: I try create two-dimentional integer array from query results: Well, you could do that with a suitably defined aggregate having the signature "agg(anyarray) returns anyarray". But array_agg has the signature "array_agg(anyelement) returns anyarray" so you can't use it on an array input. 2-D arrays are not distinct from 1-D arrays so far as the type system is concerned. regards, tom lane