mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
binary migration: pg_migrator
Add comments about places where system oids have to be preserved for binary migration.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.161 2009/09/04 11:20:22 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.162 2009/12/19 00:47:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -328,6 +328,11 @@ array_in(PG_FUNCTION_ARGS)
|
||||
SET_VARSIZE(retval, nbytes);
|
||||
retval->ndim = ndim;
|
||||
retval->dataoffset = dataoffset;
|
||||
/*
|
||||
* This comes from the array's pg_type.typelem (which points to the
|
||||
* base data type's pg_type.oid) and stores system oids in user tables.
|
||||
* This oid must be preserved by binary upgrades.
|
||||
*/
|
||||
retval->elemtype = element_type;
|
||||
memcpy(ARR_DIMS(retval), dim, ndim * sizeof(int));
|
||||
memcpy(ARR_LBOUND(retval), lBound, ndim * sizeof(int));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/enum.c,v 1.7 2009/01/01 17:23:49 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/enum.c,v 1.8 2009/12/19 00:47:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -56,6 +56,10 @@ enum_in(PG_FUNCTION_ARGS)
|
||||
format_type_be(enumtypoid),
|
||||
name)));
|
||||
|
||||
/*
|
||||
* This comes from pg_enum.oid and stores system oids in user tables.
|
||||
* This oid must be preserved by binary upgrades.
|
||||
*/
|
||||
enumoid = HeapTupleGetOid(tup);
|
||||
|
||||
ReleaseSysCache(tup);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/rowtypes.c,v 1.25 2009/06/11 14:49:04 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/rowtypes.c,v 1.26 2009/12/19 00:47:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -97,6 +97,11 @@ record_in(PG_FUNCTION_ARGS)
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("input of anonymous composite types is not implemented")));
|
||||
tupTypmod = -1; /* for all non-anonymous types */
|
||||
/*
|
||||
* This comes from the composite type's pg_type.oid and
|
||||
* stores system oids in user tables, specifically DatumTupleFields.
|
||||
* This oid must be preserved by binary upgrades.
|
||||
*/
|
||||
tupdesc = lookup_rowtype_tupdesc(tupType, tupTypmod);
|
||||
ncolumns = tupdesc->natts;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user