Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d34a74d

Browse files
committed
Backpatch introduction of TupleDescAttr(tupdesc, i).
2cd7084 / c629324 change the way individual attributes in a TupleDesc are stored / accessed. To reduce the effort of making extensions compatible with postgresql 11, and to ease future backpatching, backpatch introduction of TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/[email protected] Backpatch: 9.2-
1 parent 958ffb8 commit d34a74d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/include/access/tupdesc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ typedef struct tupleDesc
8181
} *TupleDesc;
8282

8383

84+
/* Accessor for the i'th attribute of tupdesc. */
85+
#define TupleDescAttr(tupdesc, i) ((tupdesc)->attrs[(i)])
86+
8487
extern TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid);
8588

8689
extern TupleDesc CreateTupleDesc(int natts, bool hasoid,

0 commit comments

Comments
 (0)