88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.155 2000/12/27 23:59:11 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.156 2001/01/01 21:33:31 tgl Exp $
1212 *
1313 *
1414 * INTERFACE ROUTINES
@@ -590,8 +590,11 @@ AddNewAttributeTuples(Oid new_rel_oid,
590590dpp = tupdesc -> attrs ;
591591for (i = 0 ;i < natts ;i ++ )
592592{
593+ /* Fill in the correct relation OID */
593594(* dpp )-> attrelid = new_rel_oid ;
595+ /* Make sure these are OK, too */
594596(* dpp )-> attdispersion = 0 ;
597+ (* dpp )-> attcacheoff = -1 ;
595598
596599tup = heap_addheader (Natts_pg_attribute ,
597600ATTRIBUTE_TUPLE_SIZE ,
@@ -613,8 +616,12 @@ AddNewAttributeTuples(Oid new_rel_oid,
613616dpp = HeapAtt ;
614617for (i = 0 ;i < -1 - FirstLowInvalidHeapAttributeNumber ;i ++ )
615618{
619+ /* Fill in the correct relation OID */
620+ /* HACK: we are writing on static data here */
616621(* dpp )-> attrelid = new_rel_oid ;
617- /* (*dpp)->attdispersion = 0; unneeded */
622+ /* Unneeded since they should be OK in the constant data anyway */
623+ /* (*dpp)->attdispersion = 0; */
624+ /* (*dpp)->attcacheoff = -1; */
618625
619626tup = heap_addheader (Natts_pg_attribute ,
620627ATTRIBUTE_TUPLE_SIZE ,