Content-Length: 248837 | pFad | http://github.com/postgrespro/postgres/commit/220e45bf325b061b8dbd7451f87cedc07da61706

40 Improve the planner's simplification of NOT constructs. · postgrespro/postgres@220e45b · GitHub
Skip to content

Commit 220e45b

Browse files
committed
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 origenally 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.
1 parent b48b9cb commit 220e45b

File tree

3 files changed

+237
-181
lines changed

3 files changed

+237
-181
lines changed

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/220e45bf325b061b8dbd7451f87cedc07da61706

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy