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 1nDZ1i-0004OL-0W for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Jan 2022 21:43:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nDZ1f-0006Tz-Jc for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Jan 2022 21:43:23 +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 1nDZ1f-0006Tp-Bv for pgsql-bugs@lists.postgresql.org; Fri, 28 Jan 2022 21:43:23 +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 1nDZ1c-0001us-Ow for pgsql-bugs@lists.postgresql.org; Fri, 28 Jan 2022 21:43:22 +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 20SLhIgx2807140; Fri, 28 Jan 2022 16:43:18 -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: References: <17387-5dfe54b988444963@postgresql.org> Comments: In-reply-to Pavel Stehule message dated "Fri, 28 Jan 2022 21:28:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2807138.1643406198.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 28 Jan 2022 16:43:18 -0500 Message-ID: <2807139.1643406198@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > p=C3=A1 28. 1. 2022 v 21:19 odes=C3=ADlatel Pavel Stehule > napsal: >> Probably it is side effect of this patch >> https://github.com/postgres/postgres/commit/9e38c2bb5093ceb0c04d6315ccd= 8975bd17add66#diff-e2a931f90073b784e341960c6fe1f48aaea4b5d57eb4388143534ee= c3863477b > anycompatible* types are less sensitive to different data types, but it > increases a risk of possibility of errors when more than one function ca= n > be detected for execution on analysis of function's signatures. Hmm. We have regression=3D# \do || List of operators Schema | Name | Left arg type | Right arg type | Result t= ype | Description = ------------+------+--------------------+--------------------+------------= --------+------------------------------------- pg_catalog | || | anycompatible | anycompatiblearray | anycompatib= learray | prepend element onto front of array pg_catalog | || | anycompatiblearray | anycompatible | anycompatib= learray | append element onto end of array pg_catalog | || | anycompatiblearray | anycompatiblearray | anycompatib= learray | concatenate ... where before it was pg_catalog | || | anyelement | anyarray | anyarray | prepen= d element onto front of array pg_catalog | || | anyarray | anyelement | anyarray | append= element onto end of array pg_catalog | || | anyarray | anyarray | anyarray | concat= enate 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? We could s/anycompatible/anycompatiblenonarray/ in the catalog entries, but it seems like we shouldn't have to. regards, tom lane