From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem
Date: Tue, 10 Nov 2020 08:45:06 -0500
Message-ID: <dc77bfb2-3b98-c3e5-a825-6c087d51f51c@dunslane.net> (raw)
In-Reply-To: <2008195.1604961694@sss.pgh.pa.us>
References: <E1kaQ2c-0005lx-Eg@gemulon.postgresql.org>
<fff35eb5-765c-3e60-3a2a-45ba5f88777d@dunslane.net>
<1999748.1604957386@sss.pgh.pa.us>
<b300679b-6410-9124-271c-73893a2c3a1f@dunslane.net>
<2001798.1604960149@sss.pgh.pa.us>
<52030649-c25c-c4e6-8316-2fd4f9a24f8b@dunslane.net>
<2008195.1604961694@sss.pgh.pa.us>
On 11/9/20 5:41 PM, Tom Lane wrote:
>
> What I have in mind to apply to 9.5 through 13 is per attached.
> You could either redefine the aggregate similarly in 9.2-9.4,
> or just drop it. I doubt the latter leads to any interesting
> loss of coverage for xversion upgrade, as there's plenty of other
> user-defined aggregates in the regression database.
You also need to modify first_el_agg_any.
Here's what I have working on crake::
if ($oversion le 'REL9_4_STABLE')
{
# this is to be fixed in 9.5 and later
$prstmt = join(';',
'drop aggregate if exists
public.array_cat_accum(anyarray)',
'CREATE AGGREGATE array_larger_accum
(anyarray) ' .
' ( ' .
' sfunc = array_larger, ' .
' stype = anyarray, ' .
' initcond = $${}$$ ' .
' ) ' );
system( "$other_branch/inst/bin/psql -X -e "
. " -c '" . $prstmt . "' "
. "regression "
. ">> '$upgrade_loc/$oversion-copy.log' 2>&1");
return if $?;
}
# drop this branch when upstream is renovated
else
{
$prstmt = join(';',
'drop aggregate if exists
public.array_cat_accum(anyarray)',
'drop aggregate if exists
public.first_el_agg_any(anyelement)');
system( "$other_branch/inst/bin/psql -X -e "
. " -c '$prstmt' "
. "regression "
. ">> '$upgrade_loc/$oversion-copy.log' 2>&1");
return if $?;
}
When you fix the live branches I'll delete the "else" branch and push
the change to the git repo.
cheers
andrew
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-committers@postgresql.org
Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem
In-Reply-To: <dc77bfb2-3b98-c3e5-a825-6c087d51f51c@dunslane.net>
* 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