@ -196,7 +196,33 @@ extern TupleTableSlot* ExecStoreDataRowTuple(
|
||||
#endif
|
||||
extern TupleTableSlot* ExecClearTuple(TupleTableSlot* slot);
|
||||
extern void ExecClearMutilTuple(List* slots);
|
||||
extern TupleTableSlot* ExecStoreVirtualTuple(TupleTableSlot* slot);
|
||||
|
||||
/* --------------------------------
|
||||
* ExecStoreVirtualTuple
|
||||
* Mark a slot as containing a virtual tuple.
|
||||
*
|
||||
* The protocol for loading a slot with virtual tuple data is:
|
||||
* * Call ExecClearTuple to mark the slot empty.
|
||||
* * Store data into the Datum/isnull arrays.
|
||||
* * Call ExecStoreVirtualTuple to mark the slot valid.
|
||||
* This is a bit unclean but it avoids one round of data copying.
|
||||
* --------------------------------
|
||||
*/
|
||||
inline TupleTableSlot* ExecStoreVirtualTuple(TupleTableSlot* slot)
|
||||
{
|
||||
/*
|
||||
* sanity checks
|
||||
*/
|
||||
Assert(slot != NULL);
|
||||
Assert(slot->tts_tupleDescriptor != NULL);
|
||||
Assert(TTS_EMPTY(slot));
|
||||
|
||||
slot->tts_flags &= ~TTS_FLAG_EMPTY;
|
||||
slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
|
||||
|
||||
return slot;
|
||||
}
|
||||
|
||||
extern TupleTableSlot* ExecStoreAllNullTuple(TupleTableSlot* slot);
|
||||
extern HeapTuple ExecCopySlotTuple(TupleTableSlot* slot);
|
||||
extern MinimalTuple ExecCopySlotMinimalTuple(TupleTableSlot* slot, bool need_transform_anyarray = false);
|
||||
|
||||
Reference in New Issue
Block a user