diff -ruN ../base/src/backend/access/common/heaptuple.c src/backend/access/common/heaptuple.c --- ../base/src/backend/access/common/heaptuple.c 2002-07-17 22:25:38.000000000 +0200 +++ src/backend/access/common/heaptuple.c 2002-07-17 23:28:23.000000000 +0200 @@ -744,6 +744,7 @@ */ HeapTuple heap_addheader(int natts, /* max domain index */ + bool withoid, /* reserve space for oid */ Size structlen, /* its length */ void *structure) /* pointer to the struct */ { @@ -755,7 +756,10 @@ AssertArg(natts > 0); /* header needs no null bitmap */ - hoff = MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)); + hoff = offsetof(HeapTupleHeaderData, t_bits); + /*if (withoid) + hoff += sizeof(Oid);*/ + hoff = MAXALIGN(hoff); len = hoff + structlen; tuple = (HeapTuple) palloc(HEAPTUPLESIZE + len); diff -ruN ../base/src/backend/catalog/heap.c src/backend/catalog/heap.c --- ../base/src/backend/catalog/heap.c 2002-07-17 22:32:02.000000000 +0200 +++ src/backend/catalog/heap.c 2002-07-17 23:28:23.000000000 +0200 @@ -445,6 +445,7 @@ (*dpp)->attcacheoff = -1; tup = heap_addheader(Natts_pg_attribute, + false, ATTRIBUTE_TUPLE_SIZE, (void *) *dpp); @@ -481,6 +482,7 @@ Form_pg_attribute attStruct; tup = heap_addheader(Natts_pg_attribute, + false, ATTRIBUTE_TUPLE_SIZE, (void *) *dpp); @@ -585,6 +587,7 @@ * ---------------- */ tup = heap_addheader(Natts_pg_class_fixed, + true, CLASS_TUPLE_SIZE, (void *) new_rel_reltup); diff -ruN ../base/src/backend/catalog/index.c src/backend/catalog/index.c --- ../base/src/backend/catalog/index.c 2002-07-17 22:25:39.000000000 +0200 +++ src/backend/catalog/index.c 2002-07-17 23:28:23.000000000 +0200 @@ -320,6 +320,7 @@ /* XXX Natts_pg_class_fixed is a hack - see pg_class.h */ tuple = heap_addheader(Natts_pg_class_fixed, + true, CLASS_TUPLE_SIZE, (void *) indexRelation->rd_rel); @@ -407,6 +408,7 @@ Assert(indexTupDesc->attrs[i]->attcacheoff == -1); new_tuple = heap_addheader(Natts_pg_attribute, + false, ATTRIBUTE_TUPLE_SIZE, (void *) indexTupDesc->attrs[i]); @@ -496,6 +498,7 @@ * form a tuple to insert into pg_index */ tuple = heap_addheader(Natts_pg_index, + false, itupLen, (void *) indexForm); diff -ruN ../base/src/backend/commands/tablecmds.c src/backend/commands/tablecmds.c --- ../base/src/backend/commands/tablecmds.c 2002-07-17 22:25:39.000000000 +0200 +++ src/backend/commands/tablecmds.c 2002-07-17 23:28:23.000000000 +0200 @@ -1659,6 +1659,7 @@ tform = (Form_pg_type) GETSTRUCT(typeTuple); attributeTuple = heap_addheader(Natts_pg_attribute, + false, ATTRIBUTE_TUPLE_SIZE, (void *) &attributeD); diff -ruN ../base/src/include/access/heapam.h src/include/access/heapam.h --- ../base/src/include/access/heapam.h 2002-06-21 02:12:26.000000000 +0200 +++ src/include/access/heapam.h 2002-07-17 23:28:23.000000000 +0200 @@ -200,6 +200,6 @@ extern HeapTuple heap_modifytuple(HeapTuple tuple, Relation relation, Datum *replValue, char *replNull, char *repl); extern void heap_freetuple(HeapTuple tuple); -extern HeapTuple heap_addheader(int natts, Size structlen, void *structure); +extern HeapTuple heap_addheader(int natts, bool withoid, Size structlen, void *structure); #endif /* HEAPAM_H */