aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-12-13 19:46:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-12-13 19:46:01 +0000
commit3a4f7dde16ad81b2319b9a4924a6023710a2fefd (patch)
tree248cf66fd94d40072b5ba8bb8e5437a6ea8399e5 /src/backend/commands/indexcmds.c
parent77b7a740f95250af7d78f69e9c906c3e53f32e7b (diff)
downloadpostgresql-3a4f7dde16ad81b2319b9a4924a6023710a2fefd.tar.gz
postgresql-3a4f7dde16ad81b2319b9a4924a6023710a2fefd.zip
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/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index d6ccdb92613..7b66eea0b0b 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.93 2002/12/12 15:49:24 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.94 2002/12/13 19:45:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,6 +24,7 @@
#include "catalog/pg_opclass.h"
#include "catalog/pg_proc.h"
#include "commands/defrem.h"
+#include "executor/executor.h"
#include "miscadmin.h"
#include "optimizer/clauses.h"
#include "optimizer/planmain.h"
@@ -172,6 +173,8 @@ DefineIndex(RangeVar *heapRelation,
*/
indexInfo = makeNode(IndexInfo);
indexInfo->ii_Predicate = cnfPred;
+ indexInfo->ii_PredicateState = (List *)
+ ExecInitExpr((Expr *) cnfPred, NULL);
indexInfo->ii_FuncOid = InvalidOid;
indexInfo->ii_Unique = unique;