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

Commit4c8750a

Browse files
committed
Fixac218aa to work on versions before 9.5.
Unfortunatelyac218aa missed the fact that a reference to'pg_catalog.regnamespace'::regclass wouldn't work before that type isknown. Fix that, by replacing the regtype usage with a join topg_type.Reported-By: Tom LaneAuthor: Andres FreundDiscussion:https://postgr.es/m/8863.1543297423@sss.pgh.pa.usBackpatch: 9.5-, likeac218aa
1 parentac218aa commit4c8750a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

‎src/bin/pg_upgrade/check.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,18 +1011,23 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
10111011
"SELECT n.nspname, c.relname, a.attname "
10121012
"FROMpg_catalog.pg_class c, "
10131013
"pg_catalog.pg_namespace n, "
1014-
"pg_catalog.pg_attribute a "
1014+
"pg_catalog.pg_attribute a, "
1015+
"pg_catalog.pg_type t "
10151016
"WHEREc.oid = a.attrelid AND "
10161017
"NOT a.attisdropped AND "
1017-
"a.atttypid IN ( "
1018+
" a.atttypid = t.oid AND "
1019+
" t.typnamespace = "
1020+
" (SELECT oid FROM pg_namespace "
1021+
" WHERE nspname = 'pg_catalog') AND"
1022+
"t.typname IN ( "
10181023
/* regclass.oid is preserved, so 'regclass' is OK */
1019-
"'pg_catalog.regconfig'::pg_catalog.regtype, "
1020-
"'pg_catalog.regdictionary'::pg_catalog.regtype, "
1021-
"'pg_catalog.regnamespace'::pg_catalog.regtype, "
1022-
"'pg_catalog.regoper'::pg_catalog.regtype, "
1023-
"'pg_catalog.regoperator'::pg_catalog.regtype, "
1024-
"'pg_catalog.regproc'::pg_catalog.regtype, "
1025-
"'pg_catalog.regprocedure'::pg_catalog.regtype "
1024+
" 'regconfig', "
1025+
" 'regdictionary', "
1026+
" 'regnamespace', "
1027+
" 'regoper', "
1028+
" 'regoperator', "
1029+
" 'regproc', "
1030+
" 'regprocedure' "
10261031
/* regrole.oid is preserved, so 'regrole' is OK */
10271032
/* regtype.oid is preserved, so 'regtype' is OK */
10281033
") AND "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp