summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-12-29 12:38:15 -0800
committerAndres Freund <andres@anarazel.de>2017-12-29 12:45:25 -0800
commitb40933101ca622aa8a35b6fe07ace36effadf1c7 (patch)
tree386c6c5114eacc544ad6b96e6f860c92272d1740 /src/include/nodes/execnodes.h
parent4717fdb14cf0a62ffe1b1023e1c5ea8866e34fa0 (diff)
downloadpostgresql-b40933101ca622aa8a35b6fe07ace36effadf1c7.tar.gz
Perform slot validity checks in a separate pass over expression.
This reduces code duplication a bit, but the primary benefit that it makes JITing expression evaluation easier. When doing so we can't, as previously done in the interpreted case, really change opcode without recompiling. Nor dow we just carry around unnecessary branches to avoid re-checking over and over. As a minor side-effect this makes ExecEvalStepOp() O(log(N)) rather than O(N). Author: Andres Freund Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index c9a5279dc5..94351eafad 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -87,6 +87,9 @@ typedef struct ExprState
/* original expression tree, for debugging only */
Expr *expr;
+ /* private state for an evalfunc */
+ void *evalfunc_private;
+
/*
* XXX: following fields only needed during "compilation" (ExecInitExpr);
* could be thrown away afterwards.