aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>1999-02-07 16:17:14 +0000
committerJan Wieck <JanWieck@Yahoo.com>1999-02-07 16:17:14 +0000
commitef590e101ec2e7fd4d2c80b925ce2188aa000bba (patch)
treedf6c63a57a232ff236a5b0885857060f4feb5db3 /src/include
parentdd4a357dc9eeeafa0e8768ab3ae4ffaa4d8c2fcf (diff)
downloadpostgresql-ef590e101ec2e7fd4d2c80b925ce2188aa000bba.tar.gz
postgresql-ef590e101ec2e7fd4d2c80b925ce2188aa000bba.zip
Changed ExecConstraints() and ExecRelCheck() to cache the constraints
qualification expression trees in the execution state. Prevents from memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK constraints. Speedup against the variant using freeObject() is more than factor 2. Jan
Diffstat (limited to 'src/include')
-rw-r--r--src/include/executor/executor.h5
-rw-r--r--src/include/nodes/execnodes.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 33774d21f41..68d89897d09 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.28 1998/11/27 19:33:32 vadim Exp $
+ * $Id: executor.h,v 1.29 1999/02/07 16:17:12 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,7 +85,8 @@ extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
extern TupleDesc ExecutorStart(QueryDesc *queryDesc, EState *estate);
extern TupleTableSlot *ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count);
extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
-extern void ExecConstraints(char *caller, Relation rel, HeapTuple tuple);
+extern void ExecConstraints(char *caller, Relation rel, HeapTuple tuple,
+ EState *estate);
#ifdef QUERY_LIMIT
extern int ExecutorLimit(int limit);
extern int ExecutorGetLimit(void);
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index d9cdd2509de..45625c62e7b 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.22 1999/01/29 09:23:13 vadim Exp $
+ * $Id: execnodes.h,v 1.23 1999/02/07 16:17:14 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -199,6 +199,7 @@ typedef struct EState
Snapshot es_snapshot;
List *es_range_table;
RelationInfo *es_result_relation_info;
+ List **es_result_relation_constraints;
Relation es_into_relation_descriptor;
ParamListInfo es_param_list_info;
ParamExecData *es_param_exec_vals; /* this is for subselects */