pg_statistic_ext
A system 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.
Definition by PostgreSQL version
pg_statistic_ext (PostgreSQL 14)
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_oid_index" PRIMARY KEY, btree (oid) "pg_statistic_ext_name_index" UNIQUE CONSTRAINT, btree (stxname, stxnamespace) "pg_statistic_ext_relid_index" btree (stxrelid)
Documentation: pg_statistic_ext
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
- PostgreSQL 13
- column
stxstattarget
added (commit d06215d0)
- column
- PostgreSQL 12
- following columns removed (and incorporated into new table
pg_statistic_ext_data
, commit 6cbfb784):stxndistinct
stxdependencies
- following columns removed (and incorporated into new table
- PostgreSQL 10
- added (commit 7b504eb2)
References
- PostgreSQL documentation: pg_statistic_ext