pg_statistic_ext

A system catalogue table containing definitions of extended planner statistics

pg_statistic_ext is a system catalogue table containing definitions of extended planner statistics, as defined by the CREATE STATISTICS command.

pg_statistic_ext was added in PostgreSQL 10 (commit 7b504eb2).

Definition by PostgreSQL version

pg_statistic_ext (PostgreSQL 13)

             Table "pg_catalog.pg_statistic_ext"
    Column     |    Type    | Collation | Nullable | Default 
---------------+------------+-----------+----------+---------
 oid           | oid        |           | not null | 
 stxrelid      | oid        |           | not null | 
 stxname       | name       |           | not null | 
 stxnamespace  | oid        |           | not null | 
 stxowner      | oid        |           | not null | 
 stxstattarget | integer    |           | not null | 
 stxkeys       | int2vector |           | not null | 
 stxkind       | "char"[]   |           | not null | 
Indexes:
    "pg_statistic_ext_name_index" UNIQUE, btree (stxname, stxnamespace)
    "pg_statistic_ext_oid_index" UNIQUE, btree (oid)
    "pg_statistic_ext_relid_index" btree (stxrelid)
    

Documentation: pg_statistic_ext

pg_statistic_ext (PostgreSQL 12)

            Table "pg_catalog.pg_statistic_ext"
    Column    |    Type    | Collation | Nullable | Default 
--------------+------------+-----------+----------+---------
 oid          | oid        |           | not null | 
 stxrelid     | oid        |           | not null | 
 stxname      | name       |           | not null | 
 stxnamespace | oid        |           | not null | 
 stxowner     | oid        |           | not null | 
 stxkeys      | int2vector |           | not null | 
 stxkind      | "char"[]   |           | not null | 
Indexes:
    "pg_statistic_ext_name_index" UNIQUE, btree (stxname, stxnamespace)
    "pg_statistic_ext_oid_index" UNIQUE, btree (oid)
    "pg_statistic_ext_relid_index" btree (stxrelid)
    

Documentation: pg_statistic_ext

pg_statistic_ext (PostgreSQL 11)

                Table "pg_catalog.pg_statistic_ext"
     Column      |      Type       | Collation | Nullable | Default 
-----------------+-----------------+-----------+----------+---------
 stxrelid        | oid             |           | not null | 
 stxname         | name            |           | not null | 
 stxnamespace    | oid             |           | not null | 
 stxowner        | oid             |           | not null | 
 stxkeys         | int2vector      |           | not null | 
 stxkind         | "char"[]        |           | not null | 
 stxndistinct    | pg_ndistinct    |           |          | 
 stxdependencies | pg_dependencies |           |          | 
Indexes:
    "pg_statistic_ext_name_index" UNIQUE, btree (stxname, stxnamespace)
    "pg_statistic_ext_oid_index" UNIQUE, btree (oid)
    "pg_statistic_ext_relid_index" btree (stxrelid)
    

Documentation: pg_statistic_ext

pg_statistic_ext (PostgreSQL 10)

                Table "pg_catalog.pg_statistic_ext"
     Column      |      Type       | Collation | Nullable | Default 
-----------------+-----------------+-----------+----------+---------
 stxrelid        | oid             |           | not null | 
 stxname         | name            |           | not null | 
 stxnamespace    | oid             |           | not null | 
 stxowner        | oid             |           | not null | 
 stxkeys         | int2vector      |           | not null | 
 stxkind         | "char"[]        |           | not null | 
 stxndistinct    | pg_ndistinct    |           |          | 
 stxdependencies | pg_dependencies |           |          | 
Indexes:
    "pg_statistic_ext_name_index" UNIQUE, btree (stxname, stxnamespace)
    "pg_statistic_ext_oid_index" UNIQUE, btree (oid)
    "pg_statistic_ext_relid_index" btree (stxrelid)
    

Documentation: pg_statistic_ext

Change history

Categories

System catalogue

See also

CREATE STATISTICS, pg_stats_ext, pg_statistic_ext_data