aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-11-14 17:43:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-11-14 17:43:13 +0000
commit431178ae678f61ee20f6fa90ee7eb2f3ead254fb (patch)
treea98a139f364ac0ca7656ff3bac0ee26f3630da01 /src/include
parentf82df77c9d7e443796bf730f4277e730c514863c (diff)
downloadpostgresql-431178ae678f61ee20f6fa90ee7eb2f3ead254fb.tar.gz
postgresql-431178ae678f61ee20f6fa90ee7eb2f3ead254fb.zip
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/execnodes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 8b06e2897d9..0c96e7545f9 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.139.2.1 2005/11/14 17:43:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -341,6 +341,12 @@ typedef struct EState
bool *es_evTupleNull; /* local array of EPQ status */
HeapTuple *es_evTuple; /* shared array of EPQ substitute tuples */
bool es_useEvalPlan; /* evaluating EPQ tuples? */
+
+ /*
+ * this field added at end of struct to avoid post-release ABI breakage
+ * in 8.1 series. It'll be in a more logical place in 8.2.
+ */
+ TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */
} EState;