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

Commita0b4a63

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 parent181d35a commita0b4a63

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
@@ -915,18 +915,23 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
915915
"SELECT n.nspname, c.relname, a.attname "
916916
"FROMpg_catalog.pg_class c, "
917917
"pg_catalog.pg_namespace n, "
918-
"pg_catalog.pg_attribute a "
918+
"pg_catalog.pg_attribute a, "
919+
"pg_catalog.pg_type t "
919920
"WHEREc.oid = a.attrelid AND "
920921
"NOT a.attisdropped AND "
921-
"a.atttypid IN ( "
922+
" a.atttypid = t.oid AND "
923+
" t.typnamespace = "
924+
" (SELECT oid FROM pg_namespace "
925+
" WHERE nspname = 'pg_catalog') AND"
926+
"t.typname IN ( "
922927
/* regclass.oid is preserved, so 'regclass' is OK */
923-
"'pg_catalog.regconfig'::pg_catalog.regtype, "
924-
"'pg_catalog.regdictionary'::pg_catalog.regtype, "
925-
"'pg_catalog.regnamespace'::pg_catalog.regtype, "
926-
"'pg_catalog.regoper'::pg_catalog.regtype, "
927-
"'pg_catalog.regoperator'::pg_catalog.regtype, "
928-
"'pg_catalog.regproc'::pg_catalog.regtype, "
929-
"'pg_catalog.regprocedure'::pg_catalog.regtype "
928+
" 'regconfig', "
929+
" 'regdictionary', "
930+
" 'regnamespace', "
931+
" 'regoper', "
932+
" 'regoperator', "
933+
" 'regproc', "
934+
" 'regprocedure' "
930935
/* regrole.oid is preserved, so 'regrole' is OK */
931936
/* regtype.oid is preserved, so 'regtype' is OK */
932937
") AND "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp