diff --git a/src/backend/optimizer/prep/prepagg.c b/src/backend/optimizer/prep/prepagg.c index 89046f9afb..b688ff54e5 100644 --- a/src/backend/optimizer/prep/prepagg.c +++ b/src/backend/optimizer/prep/prepagg.c @@ -515,8 +515,8 @@ GetAggInitVal(Datum textInitVal, Oid transtype) /* * get_agg_clause_costs - * Recursively find the Aggref nodes in an expression tree, and - * accumulate cost information about them. + * Process the PlannerInfo's aggtransinfos and agginfos calculating the + * cost information about them. * * 'aggsplit' tells us the expected partial-aggregation mode, which affects * the cost estimates. @@ -533,10 +533,6 @@ GetAggInitVal(Datum textInitVal, Oid transtype) * In addition, we mark Aggref nodes with the correct aggtranstype, so * that that doesn't need to be done repeatedly. (That makes this function's * name a bit of a misnomer.) - * - * This does not descend into subqueries, and so should be used only after - * reduction of sublinks to subplans, or in contexts where it's known there - * are no subqueries. There mustn't be outer-aggregate references either. */ void get_agg_clause_costs(PlannerInfo *root, AggSplit aggsplit, AggClauseCosts *costs)