mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Teach planner how to propagate pathkeys from sub-SELECTs in FROM up to
the outer query. (The implementation is a bit klugy, but it would take nontrivial restructuring to make it nicer, which this is probably not worth.) This avoids unnecessary sort steps in examples like SELECT foo,count(*) FROM (SELECT ... ORDER BY foo,bar) sub GROUP BY foo which means there is now a reasonable technique for controlling the order of inputs to custom aggregates, even in the grouping case.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tlist.h,v 1.33 2003/01/20 18:55:06 tgl Exp $
|
||||
* $Id: tlist.h,v 1.34 2003/02/15 20:12:41 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,8 +26,6 @@ extern List *new_unsorted_tlist(List *targetlist);
|
||||
extern List *flatten_tlist(List *tlist);
|
||||
extern List *add_to_flat_tlist(List *tlist, List *vars);
|
||||
|
||||
extern Var *get_expr(TargetEntry *tle);
|
||||
|
||||
extern TargetEntry *get_sortgroupclause_tle(SortClause *sortClause,
|
||||
List *targetList);
|
||||
extern Node *get_sortgroupclause_expr(SortClause *sortClause,
|
||||
|
||||
Reference in New Issue
Block a user