diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index e7065d70baa..ef73976342c 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -81,6 +81,9 @@ typedef struct tupleDesc } *TupleDesc; +/* Accessor for the i'th attribute of tupdesc. */ +#define TupleDescAttr(tupdesc, i) ((tupdesc)->attrs[(i)]) + extern TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid); extern TupleDesc CreateTupleDesc(int natts, bool hasoid,