mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Don't pass the grouping target around unnecessarily.
Since commit 4f15e5d09d
made grouped_rel
set reltarget, a variety of other functions can just get it from
grouped_rel instead of having to pass it around explicitly. Simplify
accordingly.
Patch by me, reviewed by Ashutosh Bapat.
Discussion: http://postgr.es/m/CA+TgmoZ+ZJTVad-=vEq393N99KTooxv9k7M+z73qnTAqkb49BQ@mail.gmail.com
This commit is contained in:
@ -2651,12 +2651,12 @@ GroupPath *
|
||||
create_group_path(PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
Path *subpath,
|
||||
PathTarget *target,
|
||||
List *groupClause,
|
||||
List *qual,
|
||||
double numGroups)
|
||||
{
|
||||
GroupPath *pathnode = makeNode(GroupPath);
|
||||
PathTarget *target = rel->reltarget;
|
||||
|
||||
pathnode->path.pathtype = T_Group;
|
||||
pathnode->path.parent = rel;
|
||||
@ -2828,7 +2828,6 @@ GroupingSetsPath *
|
||||
create_groupingsets_path(PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
Path *subpath,
|
||||
PathTarget *target,
|
||||
List *having_qual,
|
||||
AggStrategy aggstrategy,
|
||||
List *rollups,
|
||||
@ -2836,6 +2835,7 @@ create_groupingsets_path(PlannerInfo *root,
|
||||
double numGroups)
|
||||
{
|
||||
GroupingSetsPath *pathnode = makeNode(GroupingSetsPath);
|
||||
PathTarget *target = rel->reltarget;
|
||||
ListCell *lc;
|
||||
bool is_first = true;
|
||||
bool is_first_sort = true;
|
||||
|
Reference in New Issue
Block a user