diff options
Diffstat (limited to 'src/include/executor/tuptable.h')
-rw-r--r-- | src/include/executor/tuptable.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 4210d6d838f..5250be52d33 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -174,7 +174,8 @@ struct TupleTableSlotOps /* * Copy the contents of the source slot into the destination slot's own - * context. Invoked using callback of the destination slot. + * context. Invoked using callback of the destination slot. 'dstslot' and + * 'srcslot' can be assumed to have the same number of attributes. */ void (*copyslot) (TupleTableSlot *dstslot, TupleTableSlot *srcslot); @@ -477,12 +478,19 @@ ExecCopySlotMinimalTuple(TupleTableSlot *slot) * * If a source's system attributes are supposed to be accessed in the target * slot, the target slot and source slot types need to match. + * + * Currently, 'dstslot' and 'srcslot' must have the same number of attributes. + * Future work could see this relaxed to allow the source to contain + * additional attributes and have the code here only copy over the leading + * attributes. */ static inline TupleTableSlot * ExecCopySlot(TupleTableSlot *dstslot, TupleTableSlot *srcslot) { Assert(!TTS_EMPTY(srcslot)); Assert(srcslot != dstslot); + Assert(dstslot->tts_tupleDescriptor->natts == + srcslot->tts_tupleDescriptor->natts); dstslot->tts_ops->copyslot(dstslot, srcslot); |