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 1kcEdR-0000mi-Bc for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 21:23:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcEdQ-0006pn-5J for pgsql-committers@arkaria.postgresql.org; Mon, 09 Nov 2020 21:23:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcEdP-0006pg-W4 for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 21:23:31 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcEdN-0005rt-Ey for pgsql-committers@lists.postgresql.org; Mon, 09 Nov 2020 21:23:31 +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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id BD3EB40002; Mon, 9 Nov 2020 21:23:26 +0000 (UTC) From: Andrew Dunstan Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem To: Tom Lane , pgsql-committers@lists.postgresql.org References: Message-ID: Date: Mon, 9 Nov 2020 16:23:24 -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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/4/20 4:10 PM, Tom Lane wrote: > Declare assorted array functions using anycompatible not anyelement. > > Convert array_append, array_prepend, array_cat, array_position, > array_positions, array_remove, array_replace, and width_bucket > to use anycompatiblearray. This is a simple extension of commit > 5c292e6b9 to hit some other places where there's a pretty obvious > gain in usability from doing so. > > Ideally we'd also modify other functions taking multiple old-style > polymorphic arguments. But most of the remainder are tied into one > or more operator classes, making any such change a much larger can of > worms than I desire to open right now. > > Discussion: https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends.org > This patch broke cross-version pg_upgrade testing. I have cured crake for the moment by having it execute this in the source database:     drop aggregate if exists public.array_cat_accum(anyarray);     drop aggregate if exists public.first_el_agg_any(anyelement); But I wonder if we really want to make it impossible to upgrade databases with aggregates that contain these functions? cheers andrew