From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem
Date: Mon, 09 Nov 2020 17:41:34 -0500
Message-ID: <2008195.1604961694@sss.pgh.pa.us> (raw)
In-Reply-To: <52030649-c25c-c4e6-8316-2fd4f9a24f8b@dunslane.net>
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>
Andrew Dunstan <andrew@dunslane.net> writes:
> On 11/9/20 5:15 PM, Tom Lane wrote:
>> 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.
> I doubt it's necessary. We have provision for adjusting the source
> database before we try to upgrade it. Let me know exactly what you have
> in mind and I'll try to make it work without having to mangle the
> supposedly frozen back branches.
> We don't actually run the regression suite regularly for non-live
> branches, we just try to upgrade a completely static data dir.
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.
regards, tom lane
Attachments:xversion-fix-13.patch (text/x-diff, 1.9K) downloaddiff --git a/src/test/regress/expected/polymorphism.out b/src/test/regress/expected/polymorphism.outindex 1ff40764d9..980e2e861c 100644--- a/src/test/regress/expected/polymorphism.out+++ b/src/test/regress/expected/polymorphism.out@@ -729,24 +729,24 @@ select q2, sql_if(q2 > 0, q2, q2 + 1) from int8_tbl;
(5 rows)
-- another sort of polymorphic aggregate
-CREATE AGGREGATE array_cat_accum (anyarray)+CREATE AGGREGATE array_larger_accum (anyarray)
(
- sfunc = array_cat,+ sfunc = array_larger,
stype = anyarray,
initcond = '{}'
);
-SELECT array_cat_accum(i)+SELECT array_larger_accum(i)
FROM (VALUES (ARRAY[1,2]), (ARRAY[3,4])) as t(i);
- array_cat_accum ------------------- {1,2,3,4}+ array_larger_accum +--------------------+ {3,4}
(1 row)
-SELECT array_cat_accum(i)+SELECT array_larger_accum(i)
FROM (VALUES (ARRAY[row(1,2),row(3,4)]), (ARRAY[row(5,6),row(7,8)])) as t(i);
- array_cat_accum ------------------------------------- {"(1,2)","(3,4)","(5,6)","(7,8)"}+ array_larger_accum +--------------------+ {"(5,6)","(7,8)"}
(1 row)
-- another kind of polymorphic aggregate
diff --git a/src/test/regress/sql/polymorphism.sql b/src/test/regress/sql/polymorphism.sqlindex e5222f1f81..15b8dfc6ce 100644--- a/src/test/regress/sql/polymorphism.sql+++ b/src/test/regress/sql/polymorphism.sql@@ -498,17 +498,17 @@ select q2, sql_if(q2 > 0, q2, q2 + 1) from int8_tbl;
-- another sort of polymorphic aggregate
-CREATE AGGREGATE array_cat_accum (anyarray)+CREATE AGGREGATE array_larger_accum (anyarray)
(
- sfunc = array_cat,+ sfunc = array_larger,
stype = anyarray,
initcond = '{}'
);
-SELECT array_cat_accum(i)+SELECT array_larger_accum(i)
FROM (VALUES (ARRAY[1,2]), (ARRAY[3,4])) as t(i);
-SELECT array_cat_accum(i)+SELECT array_larger_accum(i)
FROM (VALUES (ARRAY[row(1,2),row(3,4)]), (ARRAY[row(5,6),row(7,8)])) as t(i);
-- another kind of polymorphic aggregate
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: tgl@sss.pgh.pa.us, andrew@dunslane.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Declare assorted array functions using anycompatible not anyelem
In-Reply-To: <2008195.1604961694@sss.pgh.pa.us>
* 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