Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
От | Tom Lane |
---|---|
Тема | Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware) |
Дата | |
Msg-id | 598428.1677181685@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware) (Richard Guo <guofenglinux@gmail.com>) |
Ответы |
Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
|
Список | pgsql-bugs |
Richard Guo <guofenglinux@gmail.com> writes: > ISTM that for outer join identity 3, if we are given form > (A leftjoin B on (Pab)) leftjoin C on (Pbc) > then references to C Vars in higher qual levels would be marked with the > B/C join. If we've transformed it to form > A leftjoin (B leftjoin C on (Pbc)) on (Pab) > then references to C Vars in higher qual levels should be adjusted to > include both B/C join and A/B join in their varnullingrels. Hmm. I remember having convinced myself that we didn't need to change anything above the commuting OJs, but now I can't reconstruct the reasoning :-(. I wonder whether we could instead fix things by deeming that the result of the pushed-down B/C join does not yet produce correct C* variables, so that we won't allow conditions involving them to drop below the pushed-up A/B join. This would be a little bit messy in some places because now we'd consider that the A/B join is adding two OJ relids not just one to the output join relid set, while the B/C join is adding no relids even though it must execute an outer join. (But we already have that notion for semijoins and some antijoins, so maybe it's fine.) regards, tom lane
В списке pgsql-bugs по дате отправления: