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

Commit9783413

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 parent175e60a commit9783413

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
@@ -1040,6 +1040,7 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
10401040
"JOIN pg_proc AS transfn ON transfn.oid=a.aggtransfn "
10411041
"WHERE p.oid >= 16384 "
10421042
"AND a.aggtransfn = ANY(ARRAY[%s]::regprocedure[]) "
1043+
"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
10431044

10441045
/* Aggregate final functions */
10451046
"UNION ALL "
@@ -1049,13 +1050,15 @@ check_for_incompatible_polymorphics(ClusterInfo *cluster)
10491050
"JOIN pg_proc AS finalfn ON finalfn.oid=a.aggfinalfn "
10501051
"WHERE p.oid >= 16384 "
10511052
"AND a.aggfinalfn = ANY(ARRAY[%s]::regprocedure[]) "
1053+
"AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
10521054

10531055
/* Operators */
10541056
"UNION ALL "
10551057
"SELECT 'operator' AS objkind, op.oid::regoperator::text AS objname "
10561058
"FROM pg_operator AS op "
10571059
"WHERE op.oid >= 16384 "
1058-
"AND oprcode = ANY(ARRAY[%s]::regprocedure[]);",
1060+
"AND oprcode = ANY(ARRAY[%s]::regprocedure[]) "
1061+
"AND oprleft = ANY(ARRAY['anyarray', 'anyelement']::regtype[]);",
10591062
old_polymorphics.data,
10601063
old_polymorphics.data,
10611064
old_polymorphics.data);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp