---------------- * FreeExprContext * * Free an expression context, including calling any remaining * shutdown callbacks. * * Since we free the temporary context used for expression evaluation, * any previously computed pass-by-reference expression result will go away! * * If isCommit is false, we are being called in error cleanup, and should * not call callbacks but only release memor
| 465 | * ---------------- |
| 466 | */ |
| 467 | void |
| 468 | FreeExprContext(ExprContext *econtext, bool isCommit) |
| 469 | { |
| 470 | EState *estate; |
| 471 | |
| 472 | /* Call any registered callbacks */ |
| 473 | ShutdownExprContext(econtext, isCommit); |
| 474 | /* And clean up the memory used */ |
| 475 | MemoryContextDelete(econtext->ecxt_per_tuple_memory); |
| 476 | /* Unlink self from owning EState, if any */ |
| 477 | estate = econtext->ecxt_estate; |
| 478 | if (estate) |
| 479 | estate->es_exprcontexts = list_delete_ptr(estate->es_exprcontexts, |
| 480 | econtext); |
| 481 | /* And delete the ExprContext node */ |
| 482 | pfree(econtext); |
| 483 | } |
| 484 | |
| 485 | /* |
| 486 | * ReScanExprContext |
no test coverage detected