Re: Options to rowwise persist result of stable/immutable function with RECORD result

2023-03-23 Thread Eske Rahn
Hi, Thanks for the quick answer *:-D* That was a nice sideeffect of lateral. In the example, the calling code also gets simplified: WITH x AS ( SELECT clock_timestamp() rowstart, *, clock_timestamp() rowend FROM ( SELECT '1' inp UNION SELECT '2' ) y, LATERAL septima.foo(inp) g ) SE

Re: Options to rowwise persist result of stable/immutable function with RECORD result

2023-03-22 Thread David G. Johnston
On Wed, Mar 22, 2023 at 4:46 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Mar 22, 2023 at 4:32 PM Eske Rahn wrote: > >> Hi, >> >> Thanks for the quick answer *:-D* >> >> That was a nice sideeffect of lateral. >> >> In the example, the calling code also gets simplified: >> >

Re: Options to rowwise persist result of stable/immutable function with RECORD result

2023-03-22 Thread David G. Johnston
On Wed, Mar 22, 2023 at 4:32 PM Eske Rahn wrote: > Hi, > > Thanks for the quick answer *:-D* > > That was a nice sideeffect of lateral. > > In the example, the calling code also gets simplified: > > WITH x AS ( > SELECT clock_timestamp() rowstart, *, clock_timestamp() rowend FROM ( > SELECT

Re: Options to rowwise persist result of stable/immutable function with RECORD result

2023-03-22 Thread David G. Johnston
On Tuesday, March 21, 2023, Eske Rahn 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 >