summaryrefslogtreecommitdiff
path: root/src/backend/access/brin/brin_minmax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/brin/brin_minmax.c')
-rw-r--r--src/backend/access/brin/brin_minmax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/brin/brin_minmax.c b/src/backend/access/brin/brin_minmax.c
index 62fd90aabe7..ce503972f89 100644
--- a/src/backend/access/brin/brin_minmax.c
+++ b/src/backend/access/brin/brin_minmax.c
@@ -90,7 +90,7 @@ brin_minmax_add_value(PG_FUNCTION_ARGS)
}
attno = column->bv_attno;
- attr = bdesc->bd_tupdesc->attrs[attno - 1];
+ attr = TupleDescAttr(bdesc->bd_tupdesc, attno - 1);
/*
* If the recorded value is null, store the new value (which we know to be
@@ -260,7 +260,7 @@ brin_minmax_union(PG_FUNCTION_ARGS)
PG_RETURN_VOID();
attno = col_a->bv_attno;
- attr = bdesc->bd_tupdesc->attrs[attno - 1];
+ attr = TupleDescAttr(bdesc->bd_tupdesc, attno - 1);
/*
* Adjust "allnulls". If A doesn't have values, just copy the values from
@@ -347,7 +347,7 @@ minmax_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, Oid subtype,
bool isNull;
opfamily = bdesc->bd_index->rd_opfamily[attno - 1];
- attr = bdesc->bd_tupdesc->attrs[attno - 1];
+ attr = TupleDescAttr(bdesc->bd_tupdesc, attno - 1);
tuple = SearchSysCache4(AMOPSTRATEGY, ObjectIdGetDatum(opfamily),
ObjectIdGetDatum(attr->atttypid),
ObjectIdGetDatum(subtype),