mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
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
This commit is contained in:
parent
056cc366fa
commit
08385ed261
@ -1070,6 +1070,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 "
|
||||
@ -1079,13 +1080,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);
|
||||
|
Loading…
Reference in New Issue
Block a user