Re: Volatile functions under Memoize node - Mailing list pgsql-bugs

From Andrei Lepikhov
Subject Re: Volatile functions under Memoize node
Date
Msg-id 6828898d-5fe1-4709-816e-5cf606974227@gmail.com
Whole thread Raw
In response to Re: Volatile functions under Memoize node  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Volatile functions under Memoize node
List pgsql-bugs
On 20/9/2024 04:36, David Rowley wrote:
> On Fri, 20 Sept 2024 at 04:47, Andrei Lepikhov <lepihov@gmail.com> wrote:
> I'm not sure if it's a good idea to penalise your case when we're not
> all that consistent to start with.  Is this causing some sort of
> breakage?
I skimmed the code entries with such checks and found out that the 
initial reason was to avoid index scans, with a reason that such a 
routine should be applied to each tuple of the table.
The second reason - to postpone expression evaluation (9118d03) - is 
also reasonable for me. It was introduced to be consistent with the 
clause's syntactical level in the SQL.
It seems to follow the same idea as disabling subquery pull-ups: to 
avoid multiple evaluations and change the syntactical level.
At the same time, Material doesn't care about volatility. So, what was 
the idea behind the commit 990c365 you added?

-- 
regards, Andrei Lepikhov




pgsql-bugs by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Volatile functions under Memoize node
Next
From: David Rowley
Date:
Subject: Re: Volatile functions under Memoize node