Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 78a9af1

Browse files
committed
Fix out-dated comment in preprocess_groupclause()
The comment claimed we don't consider other orders of the GROUP BY clause, but this is no longer true as of db0d67d. Discussion: https://postgr.es/m/CAApHDvq65=9Ro+hLX1i9ugWEiNDvHrBibAO7ARcTnf38_JE+UQ@mail.gmail.com Backpatch-through: 15, where db0d67d was introduced.
1 parent 66fa8ff commit 78a9af1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,8 +2758,9 @@ remove_useless_groupby_columns(PlannerInfo *root)
27582758
*
27592759
* In principle it might be interesting to consider other orderings of the
27602760
* GROUP BY elements, which could match the sort ordering of other
2761-
* possible plans (eg an indexscan) and thereby reduce cost. We don't
2762-
* bother with that, though. Hashed grouping will frequently win anyway.
2761+
* possible plans (eg an indexscan) and thereby reduce cost. However, we
2762+
* don't yet have sufficient information to do that here, so that's left until
2763+
* later in planning. See get_useful_group_keys_orderings().
27632764
*
27642765
* Note: we need no comparable processing of the distinctClause because
27652766
* the parser already enforced that that matches ORDER BY.

0 commit comments

Comments
 (0)