On Fri, Dec 2, 2022 at 12:52 AM Peifeng Qiu <pg...@qiupf.dev> wrote:

> Hi hackers.
>
> When a star(*) expands into multiple fields, our current
> implementation is to generate multiple copies of the expression
> and do FieldSelects. This is very inefficient because the same
> expression get evaluated multiple times but actually we only need
> to do it once.


And so we implemented the SQL Standard LATERAL and all was well.

Given both how long we didn't have lateral and didn't do something like
this, and how long lateral has been around and this hasn't really come up,
the need for this code seems not that great.  But as to the code itself I'm
unable to properly judge.

David J.

Reply via email to