pg_statistic_ext

包含扩展规划器统计定义的系统表

pg_statistic_ext 是一个包含扩展规划器统计定义的系统目录表,由 CREATE STATISTICS 命令定义。

pg_statistic_ext 添加于 PostgreSQL 10

按 PostgreSQL 版本定义

pg_statistic_ext (PostgreSQL 17)

              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 | 
 stxstattarget | smallint     |           |          | 
 stxkind       | "char"[]     |           | not null | 
 stxexprs      | pg_node_tree | C         |          | 
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)
    

文档: pg_statistic_ext

pg_statistic_ext (PostgreSQL 16)

              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 | 
 stxexprs      | pg_node_tree | C         |          | 
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)
    

文档: pg_statistic_ext

pg_statistic_ext (PostgreSQL 15)

              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 | 
 stxexprs      | pg_node_tree | C         |          | 
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)
    

文档: pg_statistic_ext

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 | 
 stxexprs      | pg_node_tree | C         |          | 
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)
    

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

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

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

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

文档: pg_statistic_ext

更改历史记录

分类

系统目录

另请参阅

CREATE STATISTICSALTER STATISTICSpg_stats_extpg_statistic_ext_data

反馈

提交任何关于 "pg_statistic_ext" 的评论、建议或更正 此处