diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-22 23:56:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-22 23:56:45 +0000 |
commit | e8140adb10cb1cb3725f302ea989281718af161c (patch) | |
tree | 11543ee104bfeed78e5fa086439d09d49c21c40a /src/backend/optimizer/plan/createplan.c | |
parent | c9d040d85e8fd7221cafac13f53880d120d5baa0 (diff) | |
download | postgresql-e8140adb10cb1cb3725f302ea989281718af161c.tar.gz postgresql-e8140adb10cb1cb3725f302ea989281718af161c.zip |
Further sort-order twiddling in optimizer: be smart about
case where ORDER BY and GROUP BY request the same sort order.
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index ae1e2d3266b..b9742d6fef5 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.75 1999/08/22 20:14:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.76 1999/08/22 23:56:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,6 @@ static List *fix_indxqual_sublist(List *indexqual, IndexPath *index_path, Form_pg_index index); static Node *fix_indxqual_operand(Node *node, IndexPath *index_path, Form_pg_index index); -static Noname *make_noname(List *tlist, List *pathkeys, Plan *plan_node); static IndexScan *make_indexscan(List *qptlist, List *qpqual, Index scanrelid, List *indxid, List *indxqual, List *indxqualorig); static NestLoop *make_nestloop(List *qptlist, List *qpqual, Plan *lefttree, @@ -926,12 +925,12 @@ copy_costsize(Plan *dest, Plan *src) * 'tlist' is the target list of the scan to be sorted or materialized * 'pathkeys' is the list of pathkeys by which the result is to be sorted * (NIL implies no sort needed, just materialize it) - * 'plan_node' is the node which yields input tuples + * 'subplan' is the node which yields input tuples */ -static Noname * +Noname * make_noname(List *tlist, List *pathkeys, - Plan *plan_node) + Plan *subplan) { List *noname_tlist; int numsortkeys; @@ -946,7 +945,7 @@ make_noname(List *tlist, /* need to sort */ retval = (Plan *) make_sort(noname_tlist, _NONAME_RELATION_ID_, - plan_node, + subplan, numsortkeys); } else @@ -954,7 +953,7 @@ make_noname(List *tlist, /* no sort */ retval = (Plan *) make_material(noname_tlist, _NONAME_RELATION_ID_, - plan_node, + subplan, 0); } |