1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +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:
David Rowley
2024-07-02 13:41:47 +12:00
parent 0c1aca4614
commit 65b71dec2d
6 changed files with 15 additions and 14 deletions

View File

@ -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)
{