mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user