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 1kcFD4-0002Gz-CG for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 22:00:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcFD0-0003B5-TE for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 22:00:18 +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 1kcFD0-0003Ay-Mw for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 22:00:18 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcFCv-0000Yr-6a for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 22:00:17 +0000 X-Originating-IP: 99.10.92.30 Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net [99.10.92.30]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2E63E60005; Mon, 9 Nov 2020 22:00:08 +0000 (UTC) Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem To: Tom Lane Cc: pgsql-committers@lists.postgresql.org References: <1999748.1604957386@sss.pgh.pa.us> From: Andrew Dunstan Message-ID: Date: Mon, 9 Nov 2020 17:00:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <1999748.1604957386@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/9/20 4:29 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 11/4/20 4:10 PM, Tom Lane wrote: >>> Declare assorted array functions using anycompatible not anyelement. >> This patch broke cross-version pg_upgrade testing. > Uh, yeah ... didn't you get my two prior messages about that? Yes, I did, although by the time you sent them out I'd already modified crake. > >> I have cured crake >> for the moment by having it execute this in the source database: > 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? > >> But I wonder if we really want to make it impossible to upgrade >> databases with aggregates that contain these functions? > 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. cheers andrew