aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-04 21:33:36 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-04 21:33:36 +0000
commitc68489863c91a23821c4fcbfd9cfb5bce3220e8f (patch)
tree89fa9cd063fc5d1927e78c3c78d81d4cfb352a94 /src/include/nodes/execnodes.h
parentbf7b205e161a8f11bb3cea39a03d63f79decfc20 (diff)
downloadpostgresql-c68489863c91a23821c4fcbfd9cfb5bce3220e8f.tar.gz
postgresql-c68489863c91a23821c4fcbfd9cfb5bce3220e8f.zip
Fix domain_in() bug exhibited by Darcy Buskermolen. The idea of an EState
that's shorter-lived than the expression state being evaluated in it really doesn't work :-( --- we end up with fn_extra caches getting deleted while still in use. Rather than abandon the notion of caching expression state across domain_in calls altogether, I chose to make domain_in a bit cozier with ExprContext. All we really need for evaluating variable-free expressions is an ExprContext, not an EState, so I invented the notion of a "standalone" ExprContext. domain_in can prevent resource leakages by doing a ReScanExprContext on this rather than having to free it entirely; so we can make the ExprContext have the same lifespan (and particularly the same per_query memory context) as the expression state structs.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index fbf70f51526..30b3fce4165 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.157 2006/08/02 18:58:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.158 2006/08/04 21:33:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -118,7 +118,7 @@ typedef struct ExprContext
Datum domainValue_datum;
bool domainValue_isNull;
- /* Link to containing EState */
+ /* Link to containing EState (NULL if a standalone ExprContext) */
struct EState *ecxt_estate;
/* Functions to call back when ExprContext is shut down */