postgresql/src/backend
Tom Lane 220e45bf32 Improve the planner's simplification of NOT constructs.
This patch merges the responsibility for NOT-flattening into
eval_const_expressions' processing.  It wasn't done that way originally
because prepqual.c is far older than eval_const_expressions.  But putting
this work into eval_const_expressions saves one pass over the qual trees,
and in fact saves even more than that because we can exploit the knowledge
that the subexpressions have already been recursively simplified.  Doing it
this way also lets us do it uniformly over all expressions, whereas
prepqual.c formerly just did it at top level to save cycles.  That should
improve the planner's ability to recognize logically-equivalent constructs.

While at it, also add the ability to fold a NOT into BooleanTest and
NullTest constructs (the latter only for the scalar-datatype case).

Per discussion of bug #5702.
2010-10-10 23:19:50 -04:00
..
access Improve logging in VACUUM FULL VERBOSE and CLUSTER VERBOSE. 2010-10-07 21:46:46 -04:00
bootstrap Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
catalog Support triggers on views. 2010-10-10 13:45:07 -04:00
commands Support triggers on views. 2010-10-10 13:45:07 -04:00
executor Support triggers on views. 2010-10-10 13:45:07 -04:00
foreign Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
lib Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
libpq Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
main Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
nodes Support triggers on views. 2010-10-10 13:45:07 -04:00
optimizer Improve the planner's simplification of NOT constructs. 2010-10-10 23:19:50 -04:00
parser Support triggers on views. 2010-10-10 13:45:07 -04:00
po Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
port Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
postmaster Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
regex Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
replication Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
rewrite Support triggers on views. 2010-10-10 13:45:07 -04:00
snowball Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
storage Improve messages for too many private files/dirs. Per Alexey Parshin. 2010-09-28 18:08:02 -04:00
tcop Add a SECURITY LABEL command. 2010-09-27 20:55:27 -04:00
tsearch Reduce the memory requirement for large ispell dictionaries. 2010-10-06 19:31:05 -04:00
utils Support triggers on views. 2010-10-10 13:45:07 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
common.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Makefile The port/pg_latch.c symlink ought to be removed by make distclean. 2010-09-21 16:53:25 -04:00
nls.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00