|
|
@ -1341,8 +1341,6 @@ postgresGetForeignPlan(PlannerInfo *root, |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (outer_plan) |
|
|
|
if (outer_plan) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ListCell *lc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Right now, we only consider grouping and aggregation beyond |
|
|
|
* Right now, we only consider grouping and aggregation beyond |
|
|
|
* joins. Queries involving aggregates or grouping do not require |
|
|
|
* joins. Queries involving aggregates or grouping do not require |
|
|
@ -6272,10 +6270,10 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel, |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
foreach(l, aggvars) |
|
|
|
foreach(l, aggvars) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Expr *expr = (Expr *) lfirst(l); |
|
|
|
Expr *aggref = (Expr *) lfirst(l); |
|
|
|
|
|
|
|
|
|
|
|
if (IsA(expr, Aggref)) |
|
|
|
if (IsA(aggref, Aggref)) |
|
|
|
tlist = add_to_flat_tlist(tlist, list_make1(expr)); |
|
|
|
tlist = add_to_flat_tlist(tlist, list_make1(aggref)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -6289,8 +6287,6 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel, |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (havingQual) |
|
|
|
if (havingQual) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ListCell *lc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(lc, (List *) havingQual) |
|
|
|
foreach(lc, (List *) havingQual) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Expr *expr = (Expr *) lfirst(lc); |
|
|
|
Expr *expr = (Expr *) lfirst(lc); |
|
|
@ -6324,7 +6320,6 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel, |
|
|
|
if (fpinfo->local_conds) |
|
|
|
if (fpinfo->local_conds) |
|
|
|
{ |
|
|
|
{ |
|
|
|
List *aggvars = NIL; |
|
|
|
List *aggvars = NIL; |
|
|
|
ListCell *lc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(lc, fpinfo->local_conds) |
|
|
|
foreach(lc, fpinfo->local_conds) |
|
|
|
{ |
|
|
|
{ |
|
|
|