On Sun, 30 Nov 2025 at 02:17, Birler, Altan <altan.birler@tum.de> wrote:
> PostgreSQL stand-alone backend 19devel
> backend> Segmentation fault (core dumped)
> ```
>
> I have tried to minimize the query and I still get an error with the following smaller query:
> ```
> SELECT 1 FROM (VALUES (NULL),(NULL)) AS t(key) GROUP BY key HAVING COUNT(key) = ANY (ARRAY[2]);
> ```
Thanks for the detailed report.
Looks like I didn't take into account the fact that context->root can
be NULL in some cases. In this case, when called via
estimate_expression_value().
I believe the attached is the correct fix.
David