File tree 5 files changed +29
-5
lines changed
5 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $PostgreSQL: pgsql/src/backend/catalog/pg_enum.c,v 1.9 2009/01/01 17:23:37 momjian Exp $
10
+ * $PostgreSQL: pgsql/src/backend/catalog/pg_enum.c,v 1.10 2009/12/19 00:47:57 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -67,6 +67,10 @@ EnumValuesCreate(Oid enumTypeOid, List *vals)
67
67
oids = (Oid * ) palloc (n * sizeof (Oid ));
68
68
for (i = 0 ; i < n ; i ++ )
69
69
{
70
+ /*
71
+ * The pg_enum.oid is stored in user tables. This oid must be
72
+ * preserved by binary upgrades.
73
+ */
70
74
oids [i ] = GetNewOid (pg_enum );
71
75
}
72
76
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.139 2009/12/07 05:22:21 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.140 2009/12/19 00:47:57 momjian Exp $
12
12
*
13
13
* DESCRIPTION
14
14
* The "DefineFoo" routines take the parse tree and pick out the
@@ -531,6 +531,12 @@ DefineType(List *names, List *parameters)
531
531
* now have TypeCreate do all the real work.
532
532
*/
533
533
typoid =
534
+ /*
535
+ * The pg_type.oid is stored in user tables as array elements
536
+ * (base types) in ArrayType and in composite types in
537
+ * DatumTupleFields. This oid must be preserved by binary
538
+ * upgrades.
539
+ */
534
540
TypeCreate (InvalidOid , /* no predetermined type OID */
535
541
typeName , /* type name */
536
542
typeNamespace , /* namespace */
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.161 2009/09/04 11:20:22 heikki Exp $
11
+ * $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.162 2009/12/19 00:47:57 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -328,6 +328,11 @@ array_in(PG_FUNCTION_ARGS)
328
328
SET_VARSIZE (retval , nbytes );
329
329
retval -> ndim = ndim ;
330
330
retval -> dataoffset = dataoffset ;
331
+ /*
332
+ * This comes from the array's pg_type.typelem (which points to the
333
+ * base data type's pg_type.oid) and stores system oids in user tables.
334
+ * This oid must be preserved by binary upgrades.
335
+ */
331
336
retval -> elemtype = element_type ;
332
337
memcpy (ARR_DIMS (retval ), dim , ndim * sizeof (int ));
333
338
memcpy (ARR_LBOUND (retval ), lBound , ndim * sizeof (int ));
Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $PostgreSQL: pgsql/src/backend/utils/adt/enum.c,v 1.7 2009/01/01 17:23:49 momjian Exp $
10
+ * $PostgreSQL: pgsql/src/backend/utils/adt/enum.c,v 1.8 2009/12/19 00:47:57 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -56,6 +56,10 @@ enum_in(PG_FUNCTION_ARGS)
56
56
format_type_be (enumtypoid ),
57
57
name )));
58
58
59
+ /*
60
+ * This comes from pg_enum.oid and stores system oids in user tables.
61
+ * This oid must be preserved by binary upgrades.
62
+ */
59
63
enumoid = HeapTupleGetOid (tup );
60
64
61
65
ReleaseSysCache (tup );
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/utils/adt/rowtypes.c,v 1.25 2009/06/11 14:49:04 momjian Exp $
11
+ * $PostgreSQL: pgsql/src/backend/utils/adt/rowtypes.c,v 1.26 2009/12/19 00:47:57 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -97,6 +97,11 @@ record_in(PG_FUNCTION_ARGS)
97
97
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
98
98
errmsg ("input of anonymous composite types is not implemented" )));
99
99
tupTypmod = -1 ; /* for all non-anonymous types */
100
+ /*
101
+ * This comes from the composite type's pg_type.oid and
102
+ * stores system oids in user tables, specifically DatumTupleFields.
103
+ * This oid must be preserved by binary upgrades.
104
+ */
100
105
tupdesc = lookup_rowtype_tupdesc (tupType , tupTypmod );
101
106
ncolumns = tupdesc -> natts ;
102
107
You can’t perform that action at this time.
0 commit comments