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

From Peifeng Qiu
Subject Re: Optimize common expressions in projection evaluation
Date
Msg-id CAPH51beXAKCtdP1BTsU+HiQ6WDV25WqkYZ_sS5HBA-gJ4iBRPw@mail.gmail.com
Whole thread Raw
In response to Re: Optimize common expressions in projection evaluation  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
> Which is properly written as the following, using lateral, which also avoids the problem you describe:
>
> INSERT INTO tbl
> SELECT func_call.*
> FROM ft
> JOIN LATERAL convert_func(ft.rawdata) AS func_call ON true;

I didn't fully realize this syntax until you point out. Just try it out in
our case and this works well. I think My problem is mostly resolved
without the need of this patch.  Thanks!

It's still good to do something about the normal (func(v)).* syntax
if it's still considered legal. I will give a try to expanding it more
cleverly and see if we can avoid the duplicate evaluation issue.

Peifeng Qiu



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Order getopt arguments
Next
From: Niyas Sait
Date:
Subject: Re: [PATCH] Add native windows on arm64 support