mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-04 00:02:52 -05:00 
			
		
		
		
	In pg_upgrade, allow tables using regclass to be upgraded because we
preserve pg_class oids since PG 9.0.
This commit is contained in:
		
							parent
							
								
									ff68b256a5
								
							
						
					
					
						commit
						0e8f6bf0e7
					
				@ -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");
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user