Re: LATERAL quals revisited - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LATERAL quals revisited
Date
Msg-id 6846.1372258456@sss.pgh.pa.us
Whole thread Raw
In response to Re: LATERAL quals revisited  (Antonin Houska <antonin.houska@gmail.com>)
List pgsql-hackers
Antonin Houska <antonin.houska@gmail.com> writes:
> If the WHERE clause moves up, then the resulting plan might be less 
> efficient than the one we'd get if the subquery hadn't been pulled-up at 
> all.

No, because we can push the qual back down again (using a parameterized
path) if that's appropriate.  The problem at this stage is to understand
the semantics of the outer join correctly, not to make a choice of what
the plan will be.

In fact, the reason we'd not noticed this bug before is exactly that
all the test cases in the regression tests do end up pushing the qual
back down.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Bugfix and new feature for PGXS
Next
From: Alvaro Herrera
Date:
Subject: Re: Computer VARSIZE_ANY(PTR) during debugging