Re: LATERAL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LATERAL
Date
Msg-id 27580.1255828107@sss.pgh.pa.us
Whole thread Raw
In response to Re: LATERAL  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Another thought, only semi-related.  One of the big use cases for
> LATERAL in general is to use a set-returning function in the FROM
> clause that uses vars from a preceding FROM item.  I am idly wondering
> if there's a reason why ExecProject is not its own node type.

You generally need it everywhere.  Scan nodes need it because you don't
want unused columns propagating upwards, and join nodes need it because
the two input tuples have to be unified somehow.  We do skip projection
ability in a few node types, but I doubt it would be profitable to
remove it from the rest.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: LATERAL
Next
From: Robert Haas
Date:
Subject: Re: Reworks for Access Control facilities (r2363)