diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-12-13 19:46:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-12-13 19:46:01 +0000 |
commit | 3a4f7dde16ad81b2319b9a4924a6023710a2fefd (patch) | |
tree | 248cf66fd94d40072b5ba8bb8e5437a6ea8399e5 /src/backend/optimizer/path/indxpath.c | |
parent | 77b7a740f95250af7d78f69e9c906c3e53f32e7b (diff) |
Phase 3 of read-only-plans project: ExecInitExpr now builds expression
execution state trees, and ExecEvalExpr takes an expression state tree
not an expression plan tree. The plan tree is now read-only as far as
the executor is concerned. Next step is to begin actually exploiting
this property.
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r-- | src/backend/optimizer/path/indxpath.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 7a20de8c1c1..e4eedd11790 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.127 2002/12/12 15:49:28 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.128 2002/12/13 19:45:56 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1124,6 +1124,7 @@ pred_test_simple_clause(Expr *predicate, Node *clause) clause_strategy, test_strategy; Expr *test_expr; + ExprState *test_exprstate; Datum test_result; bool isNull; Relation relation; @@ -1274,9 +1275,10 @@ pred_test_simple_clause(Expr *predicate, Node *clause) (Expr *) clause_const, (Expr *) pred_const); set_opfuncid((OpExpr *) test_expr); + test_exprstate = ExecInitExpr(test_expr, NULL); - econtext = MakeExprContext(NULL, TransactionCommandContext); - test_result = ExecEvalExprSwitchContext((Node *) test_expr, econtext, + econtext = MakeExprContext(NULL, CurrentMemoryContext); + test_result = ExecEvalExprSwitchContext(test_exprstate, econtext, &isNull, NULL); FreeExprContext(econtext); |