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

Function ExecGetTriggerNewSlot

src/backend/executor/execUtils.c:1245–1262  ·  view source on GitHub ↗

* Return a relInfo's tuple slot for a trigger's NEW tuples. */

Source from the content-addressed store, hash-verified

1243 * Return a relInfo's tuple slot for a trigger's NEW tuples.
1244 */
1245TupleTableSlot *
1246ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
1247{
1248 if (relInfo->ri_TrigNewSlot == NULL)
1249 {
1250 Relation rel = relInfo->ri_RelationDesc;
1251 MemoryContext oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
1252
1253 relInfo->ri_TrigNewSlot =
1254 ExecInitExtraTupleSlot(estate,
1255 RelationGetDescr(rel),
1256 table_slot_callbacks(rel));
1257
1258 MemoryContextSwitchTo(oldcontext);
1259 }
1260
1261 return relInfo->ri_TrigNewSlot;
1262}
1263
1264/*
1265 * Return a relInfo's tuple slot for processing returning tuples.

Callers 1

AfterTriggerExecuteFunction · 0.85

Calls 3

MemoryContextSwitchToFunction · 0.85
ExecInitExtraTupleSlotFunction · 0.85
table_slot_callbacksFunction · 0.85

Tested by

no test coverage detected