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

Commit 92c3a80

Browse files
committed
Revert my erroneous fix for Taiki Yamaguchi's DISTINCT MAX() bug.
Whatever we do about that, this isn't the path to the solution.
1 parent 707867e commit 92c3a80

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.226.2.1 2008/03/27 19:06:23 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.226.2.2 2008/03/29 00:15:37 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -943,17 +943,6 @@ grouping_planner(PlannerInfo *root, double tuple_fraction)
943943
* right tlist, and it has no sort order.
944944
*/
945945
current_pathkeys = NIL;
946-
/*
947-
* In fact, since we don't optimize grouped aggregates, it
948-
* needs no sort order --- there must be exactly one output row,
949-
* and so any ORDER BY or DISTINCT attached to the query is
950-
* useless and can be dropped. Aside from saving useless cycles,
951-
* this protects us against problems with matching the hacked-up
952-
* tlist entries to sort clauses.
953-
*/
954-
Assert(!parse->groupClause);
955-
parse->sortClause = NULL;
956-
parse->distinctClause = NULL;
957946
}
958947
else
959948
{

0 commit comments

Comments
 (0)