aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeIndexonlyscan.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2024-07-02 13:41:47 +1200
committerDavid Rowley <drowley@postgresql.org>2024-07-02 13:41:47 +1200
commit65b71dec2d577e9ef7423773a88fdd075f3eb97f (patch)
tree29eb2dbbbb577b2c2ad64b4a21fdc0f660aa5347 /src/backend/executor/nodeIndexonlyscan.c
parent0c1aca461481216ff5a0e65538c4880bcf346433 (diff)
downloadpostgresql-65b71dec2d577e9ef7423773a88fdd075f3eb97f.tar.gz
postgresql-65b71dec2d577e9ef7423773a88fdd075f3eb97f.zip
Use TupleDescAttr macro consistently
A few places were directly accessing the attrs[] array. This goes against the standards set by 2cd708452. Fix that. Discussion: https://postgr.es/m/CAApHDvrBztXP3yx=NKNmo3xwFAFhEdyPnvrDg3=M0RhDs+4vYw@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeIndexonlyscan.c')
-rw-r--r--src/backend/executor/nodeIndexonlyscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c
index b49194c0167..612c6738950 100644
--- a/src/backend/executor/nodeIndexonlyscan.c
+++ b/src/backend/executor/nodeIndexonlyscan.c
@@ -658,7 +658,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)
/* First, count the number of such index keys */
for (int attnum = 0; attnum < indnkeyatts; attnum++)
{
- if (indexRelation->rd_att->attrs[attnum].atttypid == CSTRINGOID &&
+ if (TupleDescAttr(indexRelation->rd_att, attnum)->atttypid == CSTRINGOID &&
indexRelation->rd_opcintype[attnum] == NAMEOID)
namecount++;
}
@@ -676,7 +676,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)
for (int attnum = 0; attnum < indnkeyatts; attnum++)
{
- if (indexRelation->rd_att->attrs[attnum].atttypid == CSTRINGOID &&
+ if (TupleDescAttr(indexRelation->rd_att, attnum)->atttypid == CSTRINGOID &&
indexRelation->rd_opcintype[attnum] == NAMEOID)
indexstate->ioss_NameCStringAttNums[idx++] = (AttrNumber) attnum;
}