Re: Options to rowwise persist result of stable/immutable function with RECORD result - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Options to rowwise persist result of stable/immutable function with RECORD result
Date
Msg-id CAKFQuwbu7cQagO1V6nU2WAPbpFfsDYEAqKNr+aK2+ahdOkTZZw@mail.gmail.com
Whole thread Raw
In response to Options to rowwise persist result of stable/immutable function with RECORD result  (Eske Rahn <eske@septima.dk>)
Responses Re: Options to rowwise persist result of stable/immutable function with RECORD result  (Eske Rahn <eske@septima.dk>)
List pgsql-hackers
On Tuesday, March 21, 2023, Eske Rahn <eske@septima.dk> wrote:
Hi,

I have noticed a rather odd behaviour that is not strictly a bug, but is unexpected.

It is when a immutable (or stable) PG function is returning results in a record structure a select on these calls the function repeatedly for each element in the output record.

The LATERAL join modifier exists to handle this kind of situation.

David J.
 

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: HOT chain validation in verify_heapam()
Next
From: Andres Freund
Date:
Subject: Re: HOT chain validation in verify_heapam()