aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-08-22 07:46:05 -0700
committerAndres Freund <andres@anarazel.de>2017-08-22 07:47:48 -0700
commit3d58994eccb77b7ff07398049cd2eb129bb5c943 (patch)
tree8dcb4a71326fcc1236e290b38353ac7389d7cfd7 /src
parent59dde9fed40022b33b6d2568ec251aa7755a76db (diff)
downloadpostgresql-3d58994eccb77b7ff07398049cd2eb129bb5c943.tar.gz
postgresql-3d58994eccb77b7ff07398049cd2eb129bb5c943.zip
Backpatch introduction of TupleDescAttr(tupdesc, i).
2cd70845240 / c6293249d 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/20170820181723.tdswdinzptbcwhrr@alap3.anarazel.de Backpatch: 9.2-
Diffstat (limited to 'src')
-rw-r--r--src/include/access/tupdesc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h
index 083f4bdc408..af370b3c1fe 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,