From 65b71dec2d577e9ef7423773a88fdd075f3eb97f Mon Sep 17 00:00:00 2001 From: David Rowley Date: Tue, 2 Jul 2024 13:41:47 +1200 Subject: 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 --- src/backend/optimizer/util/plancat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/optimizer') 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) { -- cgit v1.2.3