From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: james.inform@pharmapp.de, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD)
Date: Fri, 28 Jan 2022 16:55:21 -0500
Message-ID: <2808394.1643406921@sss.pgh.pa.us> (raw)
In-Reply-To: <2807139.1643406198@sss.pgh.pa.us>
References: <17387-5dfe54b988444963@postgresql.org>
<CAFj8pRCdDOs9w-u7x2LHoN-uUVOQqj4SH+VfBWA9BCHBDpckgw@mail.gmail.com>
<CAFj8pRDMMTXX1B56P=7cvJvDSOYuhrVE_PBch7EFOV8-qOHNzQ@mail.gmail.com>
<2807139.1643406198@sss.pgh.pa.us>
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=# 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=# select array_agg(t) || array_agg(t) from int8_tbl t;
?column?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------------------------------
{"(123,456)","(123,4567890123456789)","(4567890123456789,123)","(45678901234567
89,4567890123456789)","(4567890123456789,-4567890123456789)","(123,456)","(123,4
567890123456789)","(4567890123456789,123)","(4567890123456789,4567890123456789)"
,"(4567890123456789,-4567890123456789)"}
(1 row)
So it seems like this is specific to type record[] somehow.
Odd.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD)
In-Reply-To: <2808394.1643406921@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox