Summary
The catalog pg_statistic_ext_data holds data for extended planner statistics defined in pg_statistic_ext. Each row in this catalog corresponds to a statistics object created with CREATE STATISTICS.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_statistic_ext_data system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
stxoidoidreferencespg_statistic_ext.oid
Extended statistics object containing the definition for this datastxdinheritbool
If true, the stats include values from child tables, not just the values in the specified relationstxdndistinctpg_ndistinct
N-distinct counts, serialized as pg_ndistinct typestxddependenciespg_dependencies
Functional dependency statistics, serialized as pg_dependencies typestxdmcvpg_mcv_list
MCV (most-common values) list statistics, serialized as pg_mcv_list typestxdexprpg_statistic[]
Per-expression statistics, serialized as an array of pg_statistic type
Related catalogs
This object references the following other system catalogs:
stxoid→pg_statistic_ext
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_statistic_ext_data.