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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user