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 1kcFSC-0002tB-7v for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 22:16:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcFS9-00079l-RR for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 22:15:57 +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 1kcFS9-00079d-Jh for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 22:15:57 +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 1kcFS3-0000fx-4G for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 22:15:56 +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 0A9MFnM92001799; Mon, 9 Nov 2020 17:15:49 -0500 From: Tom Lane To: Andrew Dunstan cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem In-reply-to: References: <1999748.1604957386@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Mon, 09 Nov 2020 17:00:05 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2001797.1604960149.1@sss.pgh.pa.us> Date: Mon, 09 Nov 2020 17:15:49 -0500 Message-ID: <2001798.1604960149@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: > On 11/9/20 4:29 PM, Tom Lane wrote: >> I think probably the right fix is just to change that test case to >> use a different implementation function, per [1]. I'm holding off >> pushing the fix till after this week's wraps, though. > I'd be ok with that. Can we devise a fix that will work all the way back > to 9.2, which is where we start upgrade testing? Hm. To fix it this way, we'd have to push the test-script change into the pre-9.5 branches. There's no technical reason we can't do that, I don't think, though it's a bit outside our normal practices. >> If I thought that user-defined aggregates relying on array_cat were >> really a thing (and not just a test case), I'd be more concerned about >> this. But it's hard to see why users shouldn't use array_agg() instead >> of rolling their own. > Possibly something that's been migrated from before we had array_agg. array_agg goes back to 8.4, and for at least most of that time it's been very much more efficient than anything based on array_cat. So I think it's past time to push any such laggards into the 21st century. regards, tom lane