From 5db2e83852cc3f25fdea48c4aa0da8696c88a826 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 28 Mar 2005 00:58:26 +0000 Subject: Rethink the order of expression preprocessing: eval_const_expressions really ought to run before canonicalize_qual, because it can now produce forms that canonicalize_qual knows how to improve (eg, NOT clauses). Also, because eval_const_expressions already knows about flattening nested ANDs and ORs into N-argument form, the initial flatten_andors pass in canonicalize_qual is now completely redundant and can be removed. This doesn't save a whole lot of code, but the time and palloc traffic eliminated is a useful gain on large expression trees. --- src/backend/optimizer/path/indxpath.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/optimizer/path/indxpath.c') diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 324dad87c73..e1328c0f9b8 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.171 2005/03/27 06:29:36 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.172 2005/03/28 00:58:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -750,8 +750,8 @@ check_partial_indexes(Query *root, RelOptInfo *rel) * that the given predicate is true. * * The top-level List structure of each list corresponds to an AND list. - * We assume that canonicalize_qual() has been applied and so there are - * no un-flattened ANDs or ORs (e.g., no AND immediately within an AND, + * We assume that eval_const_expressions() has been applied and so there + * are no un-flattened ANDs or ORs (e.g., no AND immediately within an AND, * including AND just below the top-level List structure). * If this is not true we might fail to prove an implication that is * valid, but no worse consequences will ensue. -- cgit v1.2.3