diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-12 05:11:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-12 05:11:28 +0000 |
commit | 7ace43e0c2c1e00c3c5e87154a1e5ec61390285d (patch) | |
tree | 1aa7cb43e2f1aaa852357629d58c14ab98c3ae29 /src/backend/optimizer/plan/createplan.c | |
parent | 2e7a68896bfa84b28cd57e23e141aa9c899275c7 (diff) | |
download | postgresql-7ace43e0c2c1e00c3c5e87154a1e5ec61390285d.tar.gz postgresql-7ace43e0c2c1e00c3c5e87154a1e5ec61390285d.zip |
Fix oversight in MIN/MAX optimization: must not return NULL entries
from index, since the aggregates ignore NULLs.
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 41e2edceb26..6f378c76dd8 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.178 2005/04/06 16:34:05 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.179 2005/04/12 05:11:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -73,7 +73,6 @@ static void fix_indxqual_sublist(List *indexqual, IndexOptInfo *index, static Node *fix_indxqual_operand(Node *node, IndexOptInfo *index, Oid *opclass); static List *get_switched_clauses(List *clauses, Relids outerrelids); -static List *order_qual_clauses(Query *root, List *clauses); static void copy_path_costsize(Plan *dest, Path *src); static void copy_plan_costsize(Plan *dest, Plan *src); static SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid); @@ -1417,7 +1416,7 @@ get_switched_clauses(List *clauses, Relids outerrelids) * For now, we just move any quals that contain SubPlan references (but not * InitPlan references) to the end of the list. */ -static List * +List * order_qual_clauses(Query *root, List *clauses) { List *nosubplans; |