mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
InsertPgAttributeTuple() to set attcacheoff
InsertPgAttributeTuple() is the interface between in-memory tuple descriptors and on-disk pg_attribute, so it makes sense to give it the job of resetting attcacheoff. This avoids having all the callers having to do so. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
This commit is contained in:
@@ -557,12 +557,7 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
|
||||
{
|
||||
Form_pg_attribute attr = TupleDescAttr(indexTupDesc, i);
|
||||
|
||||
/*
|
||||
* There used to be very grotty code here to set these fields, but I
|
||||
* think it's unnecessary. They should be set already.
|
||||
*/
|
||||
Assert(attr->attnum == i + 1);
|
||||
Assert(attr->attcacheoff == -1);
|
||||
|
||||
InsertPgAttributeTuple(pg_attribute, attr, indstate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user