You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by re...@apache.org on 2026/02/07 20:08:25 UTC

(cloudberry) 09/12: Tighten pg_upgrade's new check for non-upgradable anyarray usages.

This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch address_1566_p2
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 6a7414ab69c9ab18570eb63265939e656f627f0c
Author: Tom Lane <tg...@sss.pgh.pa.us>
AuthorDate: Tue Jul 5 18:23:19 2022 -0400

    Tighten pg_upgrade's new check for non-upgradable anyarray usages.
    
    We only need to reject cases when the aggregate or operator is
    itself declared with a polymorphic type.  Per buildfarm.
    
    Discussion: https://postgr.es/m/3383880.QJadu78ljV@vejsadalnx
---
 src/bin/pg_upgrade/check.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c
index 47980d3f0cc..973a6d4639d 100644
--- a/src/bin/pg_upgrade/check.c
+++ b/src/bin/pg_upgrade/check.c
@@ -1248,6 +1248,7 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
 								"JOIN pg_proc AS transfn ON transfn.oid=a.aggtransfn "
 								"WHERE p.oid >= 16384 "
 								"AND a.aggtransfn = ANY(ARRAY[%s]::regprocedure[]) "
+								"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
 
 		/* Aggregate final functions */
 								"UNION ALL "
@@ -1257,13 +1258,15 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
 								"JOIN pg_proc AS finalfn ON finalfn.oid=a.aggfinalfn "
 								"WHERE p.oid >= 16384 "
 								"AND a.aggfinalfn = ANY(ARRAY[%s]::regprocedure[]) "
+								"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
 
 		/* Operators */
 								"UNION ALL "
 								"SELECT 'operator' AS objkind, op.oid::regoperator::text AS objname "
 								"FROM pg_operator AS op "
 								"WHERE op.oid >= 16384 "
-								"AND oprcode = ANY(ARRAY[%s]::regprocedure[]);",
+								"AND oprcode = ANY(ARRAY[%s]::regprocedure[]) "
+								"AND oprleft = ANY(ARRAY['anyarray', 'anyelement']::regtype[]);",
 								old_polymorphics.data,
 								old_polymorphics.data,
 								old_polymorphics.data);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org