aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/analyzejoins.c
Commit message (Collapse)AuthorAge
...
* Fix join-removal logic for pseudoconstant and outerjoin-delayed quals.Tom Lane2010-09-14
| | | | | | | | | | | | | | | | | | In these cases a qual can get marked with the removable rel in its required_relids, but this is just to schedule its evaluation correctly, not because it really depends on the rel. We were assuming that, in effect, we could throw away *all* quals so marked, which is nonsense. Tighten up the logic to be a little more paranoid about which quals belong to the outer join being considered for removal, and arrange for all quals that don't belong to be updated so they will still get evaluated correctly. Also fix another problem that happened to be exposed by this test case, which was that make_join_rel() was failing to notice some cases where a constant-false qual could be used to prove a join relation empty. If it's a pushed-down constant false, then the relation is empty even if it's an outer join, because the qual applies after the outer join expansion. Per report from Nathan Grange. Back-patch into 9.0.
* pgindent run for 9.0, second runBruce Momjian2010-07-06
|
* Fix oversight in join removal patch: we have to delete the removed relationTom Lane2010-05-23
| | | | from SpecialJoinInfo relid sets as well. Per example from Vaclav Novotny.
* Rework join-removal logic as per recent discussion. In particular thisTom Lane2010-03-28
fixes things so that it works for cases where nested removals are possible. The overhead of the optimization should be significantly less, as well.