summaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/executor.h19
-rw-r--r--src/include/executor/nodeSubplan.h5
2 files changed, 16 insertions, 8 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index cc2e49efafc..1eb158440b1 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.107 2004/03/02 18:56:15 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.108 2004/03/17 01:02:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,17 +17,26 @@
#include "executor/execdesc.h"
-/* ----------------
- * TupIsNull
+/*
+ * TupIsNull
*
* This is used mainly to detect when there are no more
* tuples to process.
- * ----------------
*/
/* return: true if tuple in slot is NULL, slot is slot to test */
#define TupIsNull(slot) \
((slot) == NULL || (slot)->val == NULL)
+
+/*
+ * ExecEvalExpr was formerly a function containing a switch statement;
+ * now it's just a macro invoking the function pointed to by an ExprState
+ * node. Beware of double evaluation of the ExprState argument!
+ */
+#define ExecEvalExpr(expr, econtext, isNull, isDone) \
+ ((*(expr)->evalfunc) (expr, econtext, isNull, isDone))
+
+
/*
* prototypes from functions in execAmi.c
*/
@@ -125,8 +134,6 @@ extern Tuplestorestate *ExecMakeTableFunctionResult(ExprState *funcexpr,
ExprContext *econtext,
TupleDesc expectedDesc,
TupleDesc *returnDesc);
-extern Datum ExecEvalExpr(ExprState *expression, ExprContext *econtext,
- bool *isNull, ExprDoneCond *isDone);
extern Datum ExecEvalExprSwitchContext(ExprState *expression, ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone);
extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
diff --git a/src/include/executor/nodeSubplan.h b/src/include/executor/nodeSubplan.h
index 0335f1ca8c8..475a2bb6185 100644
--- a/src/include/executor/nodeSubplan.h
+++ b/src/include/executor/nodeSubplan.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/nodeSubplan.h,v 1.19 2003/11/29 22:41:01 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/executor/nodeSubplan.h,v 1.20 2004/03/17 01:02:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,8 @@
extern void ExecInitSubPlan(SubPlanState *node, EState *estate);
extern Datum ExecSubPlan(SubPlanState *node,
ExprContext *econtext,
- bool *isNull);
+ bool *isNull,
+ ExprDoneCond *isDone);
extern void ExecEndSubPlan(SubPlanState *node);
extern void ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent);