* ExecPrepareCheck -- initialize check constraint for execution outside a * normal Plan tree context. * * See ExecPrepareExpr() and ExecInitCheck() for details. */
| 806 | * See ExecPrepareExpr() and ExecInitCheck() for details. |
| 807 | */ |
| 808 | ExprState * |
| 809 | ExecPrepareCheck(List *qual, EState *estate) |
| 810 | { |
| 811 | ExprState *result; |
| 812 | MemoryContext oldcontext; |
| 813 | |
| 814 | oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); |
| 815 | |
| 816 | qual = (List *) expression_planner((Expr *) qual); |
| 817 | |
| 818 | result = ExecInitCheck(qual, NULL); |
| 819 | |
| 820 | MemoryContextSwitchTo(oldcontext); |
| 821 | |
| 822 | return result; |
| 823 | } |
| 824 | |
| 825 | /* |
| 826 | * Call ExecPrepareExpr() on each member of a list of Exprs, and return |
no test coverage detected