Rethink the order of expression preprocessing: eval_const_expressions

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 5db2e83852cc3f25fdea48c4aa0da8696c88a826
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-03-28T00:58:26Z
Releases: 8.1.0
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.

Files