On 03/10/2012 02:15 AM, Tom Lane wrote:
> Um ... how do you get the subquery result rows to join to only the
> correct rows of the other tables?
The subquery just restricts the set of rows that the function has to
evaluate. The main query is supposed to perform the join.
I understand, such a join causes repeated scan of the function if the
function is on the inner side.
> This looks like an unconstrained join
> to me, which is not what I believe the SQL spec for LATERAL to be,
o.k., then just forget about my proposal. Thanks for your comments anyway,
Tony H.