diff options
Diffstat (limited to 'src/include/executor/tuptable.h')
-rw-r--r-- | src/include/executor/tuptable.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 7e6b40acb1e..9470d385309 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -219,7 +219,6 @@ extern void slot_getmissingattrs(TupleTableSlot *slot, int startAttNum, int lastAttNum); extern Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull); -extern void slot_getsomeattrs(TupleTableSlot *slot, int attnum); /* in access/common/heaptuple.c */ extern bool slot_attisnull(TupleTableSlot *slot, int attnum); @@ -227,10 +226,22 @@ extern bool slot_getsysattr(TupleTableSlot *slot, int attnum, Datum *value, bool *isnull); extern Datum getmissingattr(TupleDesc tupleDesc, int attnum, bool *isnull); +extern void slot_getsomeattrs_int(TupleTableSlot *slot, int attnum); #ifndef FRONTEND /* + * This function forces the entries of the slot's Datum/isnull arrays to be + * valid at least up through the attnum'th entry. + */ +static inline void +slot_getsomeattrs(TupleTableSlot *slot, int attnum) +{ + if (slot->tts_nvalid < attnum) + slot_getsomeattrs_int(slot, attnum); +} + +/* * slot_getallattrs * This function forces all the entries of the slot's Datum/isnull * arrays to be valid. The caller may then extract data directly |