diff options
Diffstat (limited to 'src/backend/optimizer/plan/setrefs.c')
-rw-r--r-- | src/backend/optimizer/plan/setrefs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index c192dc4f700..5cac171cb6e 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -883,8 +883,9 @@ set_plan_refs(PlannerInfo *root, Plan *plan, int rtoffset) * If the main target relation is a partitioned table, the * following list contains the RT indexes of partitioned child * relations including the root, which are not included in the - * above list. We also keep RT indexes of the roots separately - * to be identitied as such during the executor initialization. + * above list. We also keep RT indexes of the roots + * separately to be identitied as such during the executor + * initialization. */ if (splan->partitioned_rels != NIL) { @@ -893,9 +894,9 @@ set_plan_refs(PlannerInfo *root, Plan *plan, int rtoffset) list_copy(splan->partitioned_rels)); /* Remember where this root will be in the global list. */ splan->rootResultRelIndex = - list_length(root->glob->rootResultRelations); + list_length(root->glob->rootResultRelations); root->glob->rootResultRelations = - lappend_int(root->glob->rootResultRelations, + lappend_int(root->glob->rootResultRelations, linitial_int(splan->partitioned_rels)); } } |