Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDZDL-0004lq-HK for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Jan 2022 21:55:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nDZDJ-0000Uq-U3 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Jan 2022 21:55:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDZDJ-0000Uh-MH for pgsql-bugs@lists.postgresql.org; Fri, 28 Jan 2022 21:55:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDZDH-00020Z-Ft for pgsql-bugs@lists.postgresql.org; Fri, 28 Jan 2022 21:55:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 20SLtLTG2808395; Fri, 28 Jan 2022 16:55:21 -0500 From: Tom Lane To: Pavel Stehule cc: james.inform@pharmapp.de, PostgreSQL mailing lists Subject: Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD) In-reply-to: <2807139.1643406198@sss.pgh.pa.us> References: <17387-5dfe54b988444963@postgresql.org> <2807139.1643406198@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 28 Jan 2022 16:43:18 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2808393.1643406921.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 28 Jan 2022 16:55:21 -0500 Message-ID: <2808394.1643406921@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > ... which was non-ambiguous because in this usage, anyelement > wouldn't match an array type. I wonder why that's not > happening with the anycompatible family? Poking further, this case still works: regression=3D# select array[1] || array[2]; ?column? = ---------- {1,2} (1 row) so we didn't break it completely (I rather imagine we have regression tests that would have noticed that). Also, you can still concatenate arrays of known composite types: regression=3D# select array_agg(t) || array_agg(t) from int8_tbl t; = = ?column? = = = = = --------------------------------------------------------------------------= ------ --------------------------------------------------------------------------= ------ --------------------------------------------------------------------------= ------ ----------------------------------------- {"(123,456)","(123,4567890123456789)","(4567890123456789,123)","(45678901= 234567 89,4567890123456789)","(4567890123456789,-4567890123456789)","(123,456)","= (123,4 567890123456789)","(4567890123456789,123)","(4567890123456789,456789012345= 6789)" ,"(4567890123456789,-4567890123456789)"} (1 row) So it seems like this is specific to type record[] somehow. Odd. regards, tom lane