aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/plancat.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/optimizer/util/plancat.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/optimizer/util/plancat.c')
-rw-r--r--src/backend/optimizer/util/plancat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 775955363ef..9efdd844aac 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -174,7 +174,7 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,
{
for (int i = 0; i < relation->rd_att->natts; i++)
{
- FormData_pg_attribute *attr = &relation->rd_att->attrs[i];
+ Form_pg_attribute attr = TupleDescAttr(relation->rd_att, i);
if (attr->attnotnull)
{