From 76ce39e386fdcd73c864ac1cf79cb81547e54e4f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Nov 2005 17:42:55 +0000 Subject: Prevent ExecInsert() and ExecUpdate() from scribbling on the result tuple slot of the topmost plan node when a trigger returns a modified tuple. These appear to be the only places where a plan node's caller did not treat the result slot as read-only, which is an assumption that nodeUnique makes as of 8.1. Fixes trigger-vs-DISTINCT bug reported by Frank van Vugt. --- src/include/nodes/execnodes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/nodes/execnodes.h') diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 8b06e2897d9..c638c28a02b 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.139 2005/10/15 02:49:45 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.140 2005/11/14 17:42:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -304,6 +304,8 @@ typedef struct EState ResultRelInfo *es_result_relation_info; /* currently active array elt */ JunkFilter *es_junkFilter; /* currently active junk filter */ + TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */ + Relation es_into_relation_descriptor; /* for SELECT INTO */ bool es_into_relation_use_wal; -- cgit v1.2.3