pg_statistic_ext_data — PostgreSQL system catalog

The PostgreSQL pg_statistic_ext_data system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

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):

  • stxoid oid references pg_statistic_ext.oid
    Extended statistics object containing the definition for this data
  • stxdinherit bool
    If true, the stats include values from child tables, not just the values in the specified relation
  • stxdndistinct pg_ndistinct
    N-distinct counts, serialized as pg_ndistinct type
  • stxddependencies pg_dependencies
    Functional dependency statistics, serialized as pg_dependencies type
  • stxdmcv pg_mcv_list
    MCV (most-common values) list statistics, serialized as pg_mcv_list type
  • stxdexpr pg_statistic[]
    Per-expression statistics, serialized as an array of pg_statistic type

Related catalogs

This object references the following other system catalogs:

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.