summaryrefslogtreecommitdiff
path: root/src/backend/access/common/attmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/common/attmap.c')
-rw-r--r--src/backend/access/common/attmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/access/common/attmap.c b/src/backend/access/common/attmap.c
index b0fe27ef57d..0805c4121ee 100644
--- a/src/backend/access/common/attmap.c
+++ b/src/backend/access/common/attmap.c
@@ -135,7 +135,7 @@ build_attrmap_by_position(TupleDesc indesc,
/* Check for unused input columns */
for (; j < indesc->natts; j++)
{
- if (TupleDescAttr(indesc, j)->attisdropped)
+ if (TupleDescCompactAttr(indesc, j)->attisdropped)
continue;
nincols++;
same = false; /* we'll complain below */
@@ -299,8 +299,8 @@ check_attrmap_match(TupleDesc indesc,
for (i = 0; i < attrMap->maplen; i++)
{
- Form_pg_attribute inatt = TupleDescAttr(indesc, i);
- Form_pg_attribute outatt = TupleDescAttr(outdesc, i);
+ CompactAttribute *inatt = TupleDescCompactAttr(indesc, i);
+ CompactAttribute *outatt;
/*
* If the input column has a missing attribute, we need a conversion.
@@ -311,6 +311,8 @@ check_attrmap_match(TupleDesc indesc,
if (attrMap->attnums[i] == (i + 1))
continue;
+ outatt = TupleDescCompactAttr(outdesc, i);
+
/*
* If it's a dropped column and the corresponding input column is also
* dropped, we don't need a conversion. However, attlen and attalign