aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/analyzejoins.c
Commit message (Collapse)AuthorAge
* pgindent run before PG 9.1 beta 1.Bruce Momjian2011-04-10
|
* Stamp copyrights for year 2011.Bruce Momjian2011-01-01
|
* Fix PlaceHolderVar mechanism's interaction with outer joins.Tom Lane2010-09-28
| | | | | | | | | | | | | | The point of a PlaceHolderVar is to allow a non-strict expression to be evaluated below an outer join, after which its value bubbles up like a Var and can be forced to NULL when the outer join's semantics require that. However, there was a serious design oversight in that, namely that we didn't ensure that there was actually a correct place in the plan tree to evaluate the placeholder :-(. It may be necessary to delay evaluation of an outer join to ensure that a placeholder that should be evaluated below the join can be evaluated there. Per recent bug report from Kirill Simonov. Back-patch to 8.4 where the PlaceHolderVar mechanism was introduced.
* Fix another join removal bug: the check on PlaceHolderVars was wrong.Tom Lane2010-09-25
| | | | | | | | The previous coding would decide that join removal was unsafe upon finding a PlaceHolderVar that needed to be evaluated at the inner rel and then used above the join. However, this fails to cover the case of PlaceHolderVars that refer to both the inner rel and some other rels. Per bug report from Andrus.
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* 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.