diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-10-17 16:41:00 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-10-17 16:41:00 -0400 |
commit | 26cb82030fa83e222f5744fb8254ec9073162273 (patch) | |
tree | cebf2893b90a6c0fd7f70fa3714e61be5ca86dfd /src/backend/executor/execMain.c | |
parent | 48d818ede15b3e43546e8d49dc19a3021bc773cf (diff) | |
download | postgresql-26cb82030fa83e222f5744fb8254ec9073162273.tar.gz postgresql-26cb82030fa83e222f5744fb8254ec9073162273.zip |
Improve some comments related to executor result relations.
es_leaf_result_relations doesn't exist; perhaps this was an old name
for es_tuple_routing_result_relations, or maybe this comment has gone
unmaintained through multiple rounds of whacking the code around.
Related comment in execnodes.h was both obsolete and ungrammatical.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 0a766ef1e5a..ba156f8c5fc 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1347,14 +1347,16 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo, } /* - * ExecGetTriggerResultRel - * - * Get a ResultRelInfo for a trigger target relation. Most of the time, - * triggers are fired on one of the result relations of the query, and so - * we can just return a member of the es_result_relations array, the - * es_root_result_relations array (if any), or the es_leaf_result_relations - * list (if any). (Note: in self-join situations there might be multiple - * members with the same OID; if so it doesn't matter which one we pick.) + * ExecGetTriggerResultRel + * Get a ResultRelInfo for a trigger target relation. + * + * Most of the time, triggers are fired on one of the result relations of the + * query, and so we can just return a member of the es_result_relations array, + * or the es_root_result_relations array (if any), or the + * es_tuple_routing_result_relations list (if any). (Note: in self-join + * situations there might be multiple members with the same OID; if so it + * doesn't matter which one we pick.) + * * However, it is sometimes necessary to fire triggers on other relations; * this happens mainly when an RI update trigger queues additional triggers * on other relations, which will be processed in the context of the outer @@ -1404,6 +1406,7 @@ ExecGetTriggerResultRel(EState *estate, Oid relid) if (RelationGetRelid(rInfo->ri_RelationDesc) == relid) return rInfo; } + /* Nope, but maybe we already made an extra ResultRelInfo for it */ foreach(l, estate->es_trig_target_relations) { |