pg_statistic_ext

The pg_statistic_ext catalog provides information about extended statistics definitions.

Column name Data type Description
oid oid A row identifier.
stxrelid oid (references pg_class.oid) The table containing the columns described by this statistics object.
stxname name The name of the statistics object.
stxnamespace oid (references pg_namespace.oid) The OID of the namespace that contains this statistics object.
stxowner oid (references pg_authid.oid) The owner of the statistics object.
stxkeys int2vector (references pg_attribute.attnum) The array of attribute numbers indicating which table columns are covered by the statistics object. For example, 1 3 covers the first and third table columns.
stxstattarget int2 Controls the level of detail collected by ANALYZE.
The possible values are:
  • 0 – No statistics are collected.
  • NULL – Either the maximum value from the referenced columns or the system’s default. Any positive value explicitly sets the statistics target for this statistics object.
stxkind char[] The array of enabled statistics kinds.
The possible values are:
  • d – n-distinct.
  • f – Functional dependency.
  • m – Most-common-values list.
  • e – Expression statistics.
stxexprs pg_node_tree Expression trees, represented in the nodeToString() form, are included for statistics attributes that are not direct column references, with one entry per expression.
NULL – All attributes refer to simple columns.