mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Avoid listing the same ResultRelInfo in more than one EState list.
Doing so causes EXPLAIN ANALYZE to show trigger statistics multiple
times. Commit 2f17844104
seems to
be to blame for this.
Amit Langote, revieed by Amit Khandekar, Etsuro Fujita, and me.
This commit is contained in:
@ -1413,8 +1413,11 @@ ExecGetTriggerResultRel(EState *estate, Oid relid)
|
||||
rInfo++;
|
||||
nr--;
|
||||
}
|
||||
/* Third, search through the leaf result relations, if any */
|
||||
foreach(l, estate->es_leaf_result_relations)
|
||||
/*
|
||||
* Third, search through the result relations that were created during
|
||||
* tuple routing, if any.
|
||||
*/
|
||||
foreach(l, estate->es_tuple_routing_result_relations)
|
||||
{
|
||||
rInfo = (ResultRelInfo *) lfirst(l);
|
||||
if (RelationGetRelid(rInfo->ri_RelationDesc) == relid)
|
||||
|
Reference in New Issue
Block a user