From ef590e101ec2e7fd4d2c80b925ce2188aa000bba Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Sun, 7 Feb 1999 16:17:14 +0000 Subject: 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 --- src/include/executor/executor.h | 5 +++-- src/include/nodes/execnodes.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/include') 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 */ -- cgit v1.2.3