Re: Add expressions to pg_restore_extended_stats()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, Tender Wang <tndrwang@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Tomas Vondra <tomas@vondra.me>
Date: 2026-03-04T06:19:04Z
Lists: pgsql-hackers
On Wed, Mar 04, 2026 at 01:06:17AM -0500, Corey Huinker wrote:
> Not that I can see. Thanks for all the hard work!

There was actually something standing on top of my mind?  How about
some refactoring of stats_import.sql regarding the queries that check
the diffs in stats?  I was wondering if we could limit the bloat by
encapsulating these in one or more PL or SQL functions that provide
records of the diff records found, if any.  Not mandatory, still that
could be nice..
--
Michael

Commits

  1. Refactor tests for catalog diff comparisons in stats_import.sql

  2. Fix typo in stats_import.sql

  3. Add support for "exprs" in pg_restore_extended_stats()

  4. Add information about range type stats to pg_stats_ext_exprs

  5. Fix comment in extended_stats_funcs.c