Hi Fujii

On 04/11/2026 11:13, Fujii Masao wrote:
> Attached patch fixes this by providing an expression context for sampling.
> This should be backpatched to v16, where DEFAULT marker support was
> introduced.


I was able to reproduce the bug and your patch fixes it. Just for my
understanding: why use ReScanExprContext instead of ResetExprContext here?


-               /* Fetch next row */
-               MemoryContextReset(tupcontext);
-               MemoryContextSwitchTo(tupcontext);
+               /* Clean up the previous row's expression evaluation state */
+               ReScanExprContext(econtext);


Thanks for the patch!

Best, Jim



Reply via email to