↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

pg_statistic_ext

The catalog pg_statistic_ext holds definitions of extended planner statistics. Each row in this catalog corresponds to a statistics object created with CREATE STATISTICS.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
catalog
lang
en
measured attributes
true
metadata release
18.6
runtime columns
oid, stxrelid, stxname, stxnamespace, stxowner, stxkeys, stxstattarget, stxkind, stxexprs
runtime verified
false
source
english-manual

Definition PG 18

The catalog pg_statistic_ext holds definitions of extended planner statistics. Each row in this catalog corresponds to a statistics object created with CREATE STATISTICS.

Catalog columns

ColumnTypeNullabilityDescription
oidoidNot nullRow identifier
stxrelidoidNot nullTable containing the columns described by this object
stxnamenameNot nullName of the statistics object
stxnamespaceoidNot nullThe OID of the namespace that contains this statistics object
stxowneroidNot nullOwner of the statistics object
stxkeysint2vectorNot nullAn array of attribute numbers, indicating which table columns are covered by this statistics object; for example a value of 1 3 would mean that the first and the third table columns are covered
stxstattargetint2Nullablestxstattarget controls the level of detail of statistics accumulated for this statistics object by ANALYZE. A zero value indicates that no statistics should be collected. A null value says to use the maximum of the statistics targets of the referenced columns, if set, or the system default statistics target. Positive values of stxstattarget determine the target number of “most common values” to collect.
stxkindchar[]Not nullAn array containing codes for the enabled statistics kinds; valid values are: d for n-distinct statistics, f for functional dependency statistics, m for most common values (MCV) list statistics, and e for expression statistics
stxexprspg_node_treeNullableExpression trees (in nodeToString() representation) for statistics object attributes that are not simple column references. This is a list with one element per expression. Null if all statistics object attributes are simple references.

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:4b19c7fd281cc243e4d3f1e06d47fb565d58115bb4c643ac267cbd912013d920

Text language: en · catalog-bilingual-repair:4b19c7fd281cc243e4d3f1e06d47fb565d58115bb4c643ac267cbd912013d920