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

Function plpgsql_destroy_econtext

src/pl/plpgsql/src/pl_exec.c:8306–8320  ·  view source on GitHub ↗

* plpgsql_destroy_econtext --- destroy function's econtext * * We check that it matches the top stack entry, and destroy the stack * entry along with the context. */

Source from the content-addressed store, hash-verified

8304 * entry along with the context.
8305 */
8306static void
8307plpgsql_destroy_econtext(PLpgSQL_execstate *estate)
8308{
8309 SimpleEcontextStackEntry *next;
8310
8311 Assert(simple_econtext_stack != NULL);
8312 Assert(simple_econtext_stack->stack_econtext == estate->eval_econtext);
8313
8314 next = simple_econtext_stack->next;
8315 pfree(simple_econtext_stack);
8316 simple_econtext_stack = next;
8317
8318 FreeExprContext(estate->eval_econtext, true);
8319 estate->eval_econtext = NULL;
8320}
8321
8322/*
8323 * plpgsql_xact_cb --- post-transaction-commit-or-abort cleanup

Callers 3

plpgsql_exec_functionFunction · 0.85
plpgsql_exec_triggerFunction · 0.85

Calls 2

FreeExprContextFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected