diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-28 00:58:26 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-28 00:58:26 +0000 |
commit | 5db2e83852cc3f25fdea48c4aa0da8696c88a826 (patch) | |
tree | 1b6db39b1a6af12052bb93f1a7892a46a0a504d7 /src/backend/optimizer/path/indxpath.c | |
parent | bf3dbb5881e9b886ee9fe84bca2153c698eea885 (diff) | |
download | postgresql-5db2e83852cc3f25fdea48c4aa0da8696c88a826.tar.gz postgresql-5db2e83852cc3f25fdea48c4aa0da8696c88a826.zip |
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.
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r-- | src/backend/optimizer/path/indxpath.c | 6 |
1 files changed, 3 insertions, 3 deletions
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. |