Re: Defects with invalid stats data for expressions in extended stats

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Tomas Vondra <tomas@vondra.me>
Date: 2026-02-27T04:50:19Z
Lists: pgsql-hackers
>
> No, that's on purpose.  Using a SQL function with a body would not
> trigger the problem with the stats loaded at the end of the SQL test
> as we would skip the fatal call of statext_expressions_load().  Based
> on your confusion, I guess that a note to document that is in order,
> at least, so as nobody comes with the idea of changing the definition
> of this function..
>

Thanks for the explanation. Changes look good.

Commits

  1. test_custom_types: Test module with fancy custom data types

  2. Fix set of issues with extended statistics on expressions