mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
This commit is contained in:
@ -766,9 +766,9 @@ inheritance_planner(PlannerInfo *root)
|
||||
|
||||
/*
|
||||
* The rowMarks list might contain references to subquery RTEs, so
|
||||
* make a copy that we can apply ChangeVarNodes to. (Fortunately,
|
||||
* the executor doesn't need to see the modified copies --- we can
|
||||
* just pass it the original rowMarks list.)
|
||||
* make a copy that we can apply ChangeVarNodes to. (Fortunately, the
|
||||
* executor doesn't need to see the modified copies --- we can just
|
||||
* pass it the original rowMarks list.)
|
||||
*/
|
||||
subroot.rowMarks = (List *) copyObject(root->rowMarks);
|
||||
|
||||
@ -784,10 +784,11 @@ inheritance_planner(PlannerInfo *root)
|
||||
|
||||
/*
|
||||
* If this isn't the first child Query, generate duplicates of all
|
||||
* subquery RTEs, and adjust Var numbering to reference the duplicates.
|
||||
* To simplify the loop logic, we scan the original rtable not the
|
||||
* copy just made by adjust_appendrel_attrs; that should be OK since
|
||||
* subquery RTEs couldn't contain any references to the target rel.
|
||||
* subquery RTEs, and adjust Var numbering to reference the
|
||||
* duplicates. To simplify the loop logic, we scan the original rtable
|
||||
* not the copy just made by adjust_appendrel_attrs; that should be OK
|
||||
* since subquery RTEs couldn't contain any references to the target
|
||||
* rel.
|
||||
*/
|
||||
if (final_rtable != NIL)
|
||||
{
|
||||
@ -800,7 +801,7 @@ inheritance_planner(PlannerInfo *root)
|
||||
|
||||
if (rte->rtekind == RTE_SUBQUERY)
|
||||
{
|
||||
Index newrti;
|
||||
Index newrti;
|
||||
|
||||
/*
|
||||
* The RTE can't contain any references to its own RT
|
||||
@ -849,7 +850,7 @@ inheritance_planner(PlannerInfo *root)
|
||||
else
|
||||
final_rtable = list_concat(final_rtable,
|
||||
list_copy_tail(subroot.parse->rtable,
|
||||
list_length(final_rtable)));
|
||||
list_length(final_rtable)));
|
||||
|
||||
/*
|
||||
* We need to collect all the RelOptInfos from all child plans into
|
||||
@ -1317,18 +1318,17 @@ grouping_planner(PlannerInfo *root, double tuple_fraction)
|
||||
need_sort_for_grouping = true;
|
||||
|
||||
/*
|
||||
* Always override create_plan's tlist, so that we don't
|
||||
* sort useless data from a "physical" tlist.
|
||||
* Always override create_plan's tlist, so that we don't sort
|
||||
* useless data from a "physical" tlist.
|
||||
*/
|
||||
need_tlist_eval = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* create_plan returns a plan with just a "flat" tlist of
|
||||
* required Vars. Usually we need to insert the sub_tlist as the
|
||||
* tlist of the top plan node. However, we can skip that if we
|
||||
* determined that whatever create_plan chose to return will be
|
||||
* good enough.
|
||||
* create_plan returns a plan with just a "flat" tlist of required
|
||||
* Vars. Usually we need to insert the sub_tlist as the tlist of
|
||||
* the top plan node. However, we can skip that if we determined
|
||||
* that whatever create_plan chose to return will be good enough.
|
||||
*/
|
||||
if (need_tlist_eval)
|
||||
{
|
||||
@ -1546,7 +1546,7 @@ grouping_planner(PlannerInfo *root, double tuple_fraction)
|
||||
*
|
||||
* Note: it's essential here to use PVC_INCLUDE_AGGREGATES so that
|
||||
* Vars mentioned only in aggregate expressions aren't pulled out
|
||||
* as separate targetlist entries. Otherwise we could be putting
|
||||
* as separate targetlist entries. Otherwise we could be putting
|
||||
* ungrouped Vars directly into an Agg node's tlist, resulting in
|
||||
* undefined behavior.
|
||||
*/
|
||||
@ -2653,8 +2653,8 @@ make_subplanTargetList(PlannerInfo *root,
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, we must build a tlist containing all grouping columns,
|
||||
* plus any other Vars mentioned in the targetlist and HAVING qual.
|
||||
* Otherwise, we must build a tlist containing all grouping columns, plus
|
||||
* any other Vars mentioned in the targetlist and HAVING qual.
|
||||
*/
|
||||
sub_tlist = NIL;
|
||||
non_group_cols = NIL;
|
||||
@ -2705,8 +2705,8 @@ make_subplanTargetList(PlannerInfo *root,
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Non-grouping column, so just remember the expression
|
||||
* for later call to pull_var_clause. There's no need for
|
||||
* Non-grouping column, so just remember the expression for
|
||||
* later call to pull_var_clause. There's no need for
|
||||
* pull_var_clause to examine the TargetEntry node itself.
|
||||
*/
|
||||
non_group_cols = lappend(non_group_cols, tle->expr);
|
||||
@ -2733,7 +2733,7 @@ make_subplanTargetList(PlannerInfo *root,
|
||||
* add them to the result tlist if not already present. (A Var used
|
||||
* directly as a GROUP BY item will be present already.) Note this
|
||||
* includes Vars used in resjunk items, so we are covering the needs of
|
||||
* ORDER BY and window specifications. Vars used within Aggrefs will be
|
||||
* ORDER BY and window specifications. Vars used within Aggrefs will be
|
||||
* pulled out here, too.
|
||||
*/
|
||||
non_group_vars = pull_var_clause((Node *) non_group_cols,
|
||||
|
Reference in New Issue
Block a user