Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc7e21e9

Browse files
committed
Tighten pg_upgrade's new check for non-upgradable anyarray usages.
We only need to reject cases when the aggregate or operator isitself declared with a polymorphic type. Per buildfarm.Discussion:https://postgr.es/m/3383880.QJadu78ljV@vejsadalnx
1 parent4a37527 commitc7e21e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/pg_upgrade/check.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,7 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
10701070
"JOIN pg_proc AS transfn ON transfn.oid=a.aggtransfn "
10711071
"WHERE p.oid >= 16384 "
10721072
"AND a.aggtransfn = ANY(ARRAY[%s]::regprocedure[]) "
1073+
"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
10731074

10741075
/* Aggregate final functions */
10751076
"UNION ALL "
@@ -1079,13 +1080,15 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
10791080
"JOIN pg_proc AS finalfn ON finalfn.oid=a.aggfinalfn "
10801081
"WHERE p.oid >= 16384 "
10811082
"AND a.aggfinalfn = ANY(ARRAY[%s]::regprocedure[]) "
1083+
"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
10821084

10831085
/* Operators */
10841086
"UNION ALL "
10851087
"SELECT 'operator' AS objkind, op.oid::regoperator::text AS objname "
10861088
"FROM pg_operator AS op "
10871089
"WHERE op.oid >= 16384 "
1088-
"AND oprcode = ANY(ARRAY[%s]::regprocedure[]);",
1090+
"AND oprcode = ANY(ARRAY[%s]::regprocedure[]) "
1091+
"AND oprleft = ANY(ARRAY['anyarray', 'anyelement']::regtype[]);",
10891092
old_polymorphics.data,
10901093
old_polymorphics.data,
10911094
old_polymorphics.data);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp