lengthof(SysAtt) not FirstLowInvalidHeapAttributeNumber, for consistency with
the other uses of the SysAtt array, and to make it clearer that it doesn't
walk off the end of that array.
if (relkind != RELKIND_VIEW && relkind != RELKIND_COMPOSITE_TYPE)
{
dpp = SysAtt;
- for (i = 0; i < -1 - FirstLowInvalidHeapAttributeNumber; i++)
+ for (i = 0; i < (int) lengthof(SysAtt); i++, dpp++)
{
if (tupdesc->tdhasoid ||
(*dpp)->attnum != ObjectIdAttributeNumber)
heap_freetuple(tup);
}
- dpp++;
}
}