diff options
| author | Robert Haas <rhaas@postgresql.org> | 2017-08-18 13:01:05 -0400 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2017-08-18 13:01:05 -0400 |
| commit | c4b841ba6aa9252ab9dacd59d317aba8cfa9b31a (patch) | |
| tree | f04bad7b7d401e1639c2fad616242dced8609c52 /src/include | |
| parent | a20aac890a89e6f88e841dedbbfa8d9d5f7309fc (diff) | |
| download | postgresql-c4b841ba6aa9252ab9dacd59d317aba8cfa9b31a.tar.gz | |
Fix interaction of triggers, partitioning, and EXPLAIN ANALYZE.
Add a new EState member es_leaf_result_relations, so that the trigger
code knows about ResultRelInfos created by tuple routing. Also make
sure ExplainPrintTriggers knows about partition-related
ResultRelInfos.
Etsuro Fujita, reviewed by Amit Langote
Discussion: http://postgr.es/m/57163e18-8e56-da83-337a-22f2c0008051@lab.ntt.co.jp
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/executor/executor.h | 1 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 60326f9d03..eacbea3c36 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -208,6 +208,7 @@ extern void EvalPlanQualSetTuple(EPQState *epqstate, Index rti, extern HeapTuple EvalPlanQualGetTuple(EPQState *epqstate, Index rti); extern void ExecSetupPartitionTupleRouting(Relation rel, Index resultRTindex, + EState *estate, PartitionDispatch **pd, ResultRelInfo **partitions, TupleConversionMap ***tup_conv_maps, diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 577499465d..3272c4b315 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -452,6 +452,9 @@ typedef struct EState ResultRelInfo *es_root_result_relations; /* array of ResultRelInfos */ int es_num_root_result_relations; /* length of the array */ + /* Info about leaf partitions of partitioned table(s) for insert queries: */ + List *es_leaf_result_relations; /* List of ResultRelInfos */ + /* Stuff used for firing triggers: */ List *es_trig_target_relations; /* trigger-only ResultRelInfos */ TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */ |
