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

Function ExecGetReturningSlot

src/backend/executor/execUtils.c:1267–1284  ·  view source on GitHub ↗

* Return a relInfo's tuple slot for processing returning tuples. */

Source from the content-addressed store, hash-verified

1265 * Return a relInfo's tuple slot for processing returning tuples.
1266 */
1267TupleTableSlot *
1268ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
1269{
1270 if (relInfo->ri_ReturningSlot == NULL)
1271 {
1272 Relation rel = relInfo->ri_RelationDesc;
1273 MemoryContext oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
1274
1275 relInfo->ri_ReturningSlot =
1276 ExecInitExtraTupleSlot(estate,
1277 RelationGetDescr(rel),
1278 table_slot_callbacks(rel));
1279
1280 MemoryContextSwitchTo(oldcontext);
1281 }
1282
1283 return relInfo->ri_ReturningSlot;
1284}
1285
1286/*
1287 * Return the map needed to convert given child result relation's tuples to

Callers 3

apply_returning_filterFunction · 0.85
ExecInsertFunction · 0.85
ExecDeleteFunction · 0.85

Calls 3

MemoryContextSwitchToFunction · 0.85
ExecInitExtraTupleSlotFunction · 0.85
table_slot_callbacksFunction · 0.85

Tested by

no test coverage detected