On 2025-Jan-14, Richard Guo wrote:
> On Fri, Sep 27, 2024 at 5:06 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > So I'm worried that the point about lateral refs is still a problem
> > in your version. To be clear, the hazard is that if a WHERE clause
> > ends up getting placed at an outer join that's higher than any of
> > the OJs specifically listed in its required_relids, we'd misinterpret
> > it as being a join clause for that OJ although it should be a filter
> > clause.
>
> I don't quite understand how this could happen. If a WHERE clause is
> placed on an outer join but does not include the outer join's ojrelid
> in its required_relids, then it must only refer to the non-nullable
> side. In that case, we should be able to push this clause down to the
> non-nullable side of the outer join.
>
> Perhaps this issue could occur with a lateral join, but I wasn't able
> to construct such a query.
Has this patch been definitely shot down? Discussion appears to have
stalled with little conclusion.
https://commitfest.postgresql.org/patch/4458/
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/