MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecFetchSlotHeapTupleDatum

Function ExecFetchSlotHeapTupleDatum

src/backend/executor/execTuples.c:1739–1758  ·  view source on GitHub ↗

-------------------------------- * ExecFetchSlotHeapTupleDatum * Fetch the slot's tuple as a composite-type Datum. * * The result is always freshly palloc'd in the caller's memory context. * -------------------------------- */

Source from the content-addressed store, hash-verified

1737 * --------------------------------
1738 */
1739Datum
1740ExecFetchSlotHeapTupleDatum(TupleTableSlot *slot)
1741{
1742 HeapTuple tup;
1743 TupleDesc tupdesc;
1744 bool shouldFree;
1745 Datum ret;
1746
1747 /* Fetch slot's contents in regular-physical-tuple form */
1748 tup = ExecFetchSlotHeapTuple(slot, false, &shouldFree);
1749 tupdesc = slot->tts_tupleDescriptor;
1750
1751 /* Convert to Datum form */
1752 ret = heap_copy_tuple_as_datum(tup, tupdesc);
1753
1754 if (shouldFree)
1755 pfree(tup);
1756
1757 return ret;
1758}
1759
1760/* ----------------------------------------------------------------
1761 * convenience initialization routines

Callers 2

Calls 3

ExecFetchSlotHeapTupleFunction · 0.85
heap_copy_tuple_as_datumFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected