summaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 6cdc68d981a..329e727f80d 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -4200,8 +4200,6 @@ static bool
heap_attr_equals(TupleDesc tupdesc, int attrnum, Datum value1, Datum value2,
bool isnull1, bool isnull2)
{
- Form_pg_attribute att;
-
/*
* If one value is NULL and other is not, then they are certainly not
* equal
@@ -4231,8 +4229,10 @@ heap_attr_equals(TupleDesc tupdesc, int attrnum, Datum value1, Datum value2,
}
else
{
+ CompactAttribute *att;
+
Assert(attrnum <= tupdesc->natts);
- att = TupleDescAttr(tupdesc, attrnum - 1);
+ att = TupleDescCompactAttr(tupdesc, attrnum - 1);
return datumIsEqual(value1, value2, att->attbyval, att->attlen);
}
}
@@ -4314,7 +4314,7 @@ HeapDetermineColumnsInfo(Relation relation,
* that system attributes can't be stored externally.
*/
if (attrnum < 0 || isnull1 ||
- TupleDescAttr(tupdesc, attrnum - 1)->attlen != -1)
+ TupleDescCompactAttr(tupdesc, attrnum - 1)->attlen != -1)
continue;
/*