Re: Optimize common expressions in projection evaluation - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Optimize common expressions in projection evaluation
Date
Msg-id CAKFQuwYQ96h3hmc9sNJixKL13spqGX5V-nGZUArmuTM_qaWyNQ@mail.gmail.com
Whole thread Raw
In response to Optimize common expressions in projection evaluation  (Peifeng Qiu <pgsql@qiupf.dev>)
Responses Re: Optimize common expressions in projection evaluation  (Peifeng Qiu <pgsql@qiupf.dev>)
List pgsql-hackers
On Fri, Dec 2, 2022 at 12:52 AM Peifeng Qiu <pgsql@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.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Error-safe user functions
Next
From: Ranier Vilela
Date:
Subject: Re: Optimizing Node Files Support