pgsql: Add test with multirange type for pg_restore_attribute_stats()

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add test with multirange type for pg_restore_attribute_stats()
Date: 2026-08-10 13:41:24
Message-ID: E1wtQFo-00000000y95-3CYc@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add test with multirange type for pg_restore_attribute_stats()

This commit adds a test for pg_restore_attribute_stats() with the
injection of statistics related to a multirange type. This case is
supported in statatt_get_type() since its introduction in ce207d2a7901,
but there was no test in the main regression test suite to check for the
case where attribute stats is restored for a multirange type, as done by
multirange_typanalyze().

Note that this has been originally applied as d4504d6f60e0 in v19 and
newer branches. This will be used for the test of a follow-up commit.

Author: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Discussion: https://postgr.es/m/CADkLM=c3JivzHNXLt-X_JicYknRYwLTiOCHOPiKagm2_vdrFUg@mail.gmail.com
Security: CVE-2026-16238
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8d428c6e677d05122ad2286f0e8d468bb532acb1
Author: Michael Paquier <michael(at)paquier(dot)xyz>

Modified Files
--------------
src/test/regress/expected/stats_import.out | 29 ++++++++++++++++++++++++++++-
src/test/regress/sql/stats_import.sql | 24 ++++++++++++++++++++++++
2 files changed, 52 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2026-08-10 13:41:25 pgsql: Check for USAGE privilege on the composite type in ALTER TABLE O
Previous Message Noah Misch 2026-08-10 13:41:23 pgsql: Save/restore more lexer state when skipping text due to \if.