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

Function exec_eval_cleanup

src/pl/plpgsql/src/pl_exec.c:4076–4090  ·  view source on GitHub ↗

---------- * Release temporary memory used by expression/subselect evaluation * * NB: the result of the evaluation is no longer valid after this is done, * unless it is a pass-by-value datatype. * ---------- */

Source from the content-addressed store, hash-verified

4074 * ----------
4075 */
4076static void
4077exec_eval_cleanup(PLpgSQL_execstate *estate)
4078{
4079 /* Clear result of a full SPI_execute */
4080 if (estate->eval_tuptable != NULL)
4081 SPI_freetuptable(estate->eval_tuptable);
4082 estate->eval_tuptable = NULL;
4083
4084 /*
4085 * Clear result of exec_eval_simple_expr (but keep the econtext). This
4086 * also clears any short-lived allocations done via get_eval_mcontext.
4087 */
4088 if (estate->eval_econtext != NULL)
4089 ResetExprContext(estate->eval_econtext);
4090}
4091
4092
4093/* ----------

Callers 15

plpgsql_exec_functionFunction · 0.85
plpgsql_exec_triggerFunction · 0.85
exec_stmt_blockFunction · 0.85
exec_stmt_performFunction · 0.85
exec_stmt_callFunction · 0.85
exec_stmt_getdiagFunction · 0.85
exec_stmt_ifFunction · 0.85
exec_stmt_caseFunction · 0.85
exec_stmt_whileFunction · 0.85
exec_stmt_foriFunction · 0.85
exec_stmt_forcFunction · 0.85

Calls 1

SPI_freetuptableFunction · 0.85

Tested by

no test coverage detected