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

Commitac218aa

Browse files
committed
Update pg_upgrade test for reg* to include regrole and regnamespace.
When the regrole (0c90f67) and regnamespace (cb9fa80) types wereadded in 9.5, pg_upgrade's check for reg* types wasn't updated. Whileregrole currently is safe, regnamespace is not.It seems unlikely that anybody uses regnamespace inside catalog tablesacross a pg_upgrade, but the tests should be correct nevertheless.While at it, reorder the types checked in the query to bealphabetical. Otherwise it's annoying to compare existing and testedfor types.Author: Andres FreundDiscussion:https://postgr.es/m/037e152a-cb25-3bcb-4f35-bdc9988f8204@2ndQuadrant.comBackpatch: 9.5-, as regrole/regnamespace
1 parent7a9d677 commitac218aa

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/bin/pg_upgrade/check.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,14 +1015,17 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
10151015
"WHEREc.oid = a.attrelid AND "
10161016
"NOT a.attisdropped AND "
10171017
"a.atttypid IN ( "
1018-
"'pg_catalog.regproc'::pg_catalog.regtype, "
1019-
"'pg_catalog.regprocedure'::pg_catalog.regtype, "
1018+
/* 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, "
10201022
"'pg_catalog.regoper'::pg_catalog.regtype, "
10211023
"'pg_catalog.regoperator'::pg_catalog.regtype, "
1022-
/* regclass.oid is preserved, so 'regclass' is OK */
1024+
"'pg_catalog.regproc'::pg_catalog.regtype, "
1025+
"'pg_catalog.regprocedure'::pg_catalog.regtype "
1026+
/* regrole.oid is preserved, so 'regrole' is OK */
10231027
/* regtype.oid is preserved, so 'regtype' is OK */
1024-
"'pg_catalog.regconfig'::pg_catalog.regtype, "
1025-
"'pg_catalog.regdictionary'::pg_catalog.regtype) AND "
1028+
") AND "
10261029
"c.relnamespace = n.oid AND "
10271030
"n.nspname NOT IN ('pg_catalog', 'information_schema')");
10281031

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp