---------- * 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. * ---------- */
| 4074 | * ---------- |
| 4075 | */ |
| 4076 | static void |
| 4077 | exec_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 | /* ---------- |
no test coverage detected