summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-12-05 21:45:19 +0000
committerBruce Momjian2011-12-05 21:45:19 +0000
commit0e8f6bf0e7a280749cc09715acc2b27d17e1b2fd (patch)
treee41fa4e35aef25a966ce3eb0dc369ab3431d744c
parentff68b256a533b398e3420750f34d161aeee4e099 (diff)
In pg_upgrade, allow tables using regclass to be upgraded because we
preserve pg_class oids since PG 9.0.
-rw-r--r--contrib/pg_upgrade/check.c20
-rw-r--r--doc/src/sgml/pgupgrade.sgml2
2 files changed, 11 insertions, 11 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index d32a84c6354..7185f13b4a4 100644
--- a/contrib/pg_upgrade/check.c
+++ b/contrib/pg_upgrade/check.c
@@ -611,11 +611,11 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
/*
* check_for_reg_data_type_usage()
* pg_upgrade only preserves these system values:
- * pg_class.relfilenode
+ * pg_class.oid
* pg_type.oid
* pg_enum.oid
*
- * Most of the reg* data types reference system catalog info that is
+ * Many of the reg* data types reference system catalog info that is
* not preserved, and hence these data types cannot be used in user
* tables upgraded by pg_upgrade.
*/
@@ -653,16 +653,16 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
" NOT a.attisdropped AND "
" a.atttypid IN ( "
" 'pg_catalog.regproc'::pg_catalog.regtype, "
- " 'pg_catalog.regprocedure'::pg_catalog.regtype, "
+ " 'pg_catalog.regprocedure'::pg_catalog.regtype, "
" 'pg_catalog.regoper'::pg_catalog.regtype, "
- " 'pg_catalog.regoperator'::pg_catalog.regtype, "
- " 'pg_catalog.regclass'::pg_catalog.regtype, "
+ " 'pg_catalog.regoperator'::pg_catalog.regtype, "
+ /* regclass.oid is preserved, so 'regclass' is OK */
/* regtype.oid is preserved, so 'regtype' is OK */
- " 'pg_catalog.regconfig'::pg_catalog.regtype, "
- " 'pg_catalog.regdictionary'::pg_catalog.regtype) AND "
- " c.relnamespace = n.oid AND "
- " n.nspname != 'pg_catalog' AND "
- " n.nspname != 'information_schema'");
+ " 'pg_catalog.regconfig'::pg_catalog.regtype, "
+ " 'pg_catalog.regdictionary'::pg_catalog.regtype) AND "
+ " c.relnamespace = n.oid AND "
+ " n.nspname != 'pg_catalog' AND "
+ " n.nspname != 'information_schema'");
ntups = PQntuples(res);
i_nspname = PQfnumber(res, "nspname");
diff --git a/doc/src/sgml/pgupgrade.sgml b/doc/src/sgml/pgupgrade.sgml
index 460d06b6e03..ac3f99bd7da 100644
--- a/doc/src/sgml/pgupgrade.sgml
+++ b/doc/src/sgml/pgupgrade.sgml
@@ -557,7 +557,7 @@ psql --username postgres --file script.sql postgres
<application>pg_upgrade</> does not support upgrading of databases
containing these <type>reg*</> OID-referencing system data types:
<type>regproc</>, <type>regprocedure</>, <type>regoper</>,
- <type>regoperator</>, <type>regclass</>, <type>regconfig</>, and
+ <type>regoperator</>, <type>regconfig</>, and
<type>regdictionary</>. (<type>regtype</> can be upgraded.)
</para>