选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

受支持版本: 当前版本 (18) / 17 / 16 / 15 / 14
测试与开发版本: 19 / devel
不受支持的版本: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0
历史版本PostgreSQL 9.2 已于 2017 年 11 月结束社区维护,本页译文保留供仍在使用旧版本的读者参考。新系统请看当前版本

45.25. pg_index #

目录pg_index包含关于索引的部分信息。 其他信息大部分在pg_class中。

表 45.25. pg_index

Name Type References Description
indexrelid oid pg_class.oid The OID of the pg_class entry for this index
indrelid oid pg_class.oid The OID of the pg_class entry for the table this index is for
indnatts int2   The number of columns in the index (duplicates pg_class.relnatts)
indisunique bool   If true, this is a unique index
indisprimary bool   If true, this index represents the primary key of the table (indisunique should always be true when this is true)
indisexclusion bool   If true, this index supports an exclusion constraint
indimmediate bool   If true, the uniqueness check is enforced immediately on insertion (irrelevant if indisunique is not true)
indisclustered bool   If true, the table was last clustered on this index
indisvalid bool   如果此标志和indisready都为真,表示此索引当前 可用于查询。为假表示索引可能是不完整的:它仍必须由 INSERT/UPDATE 操作修改,但还不能安全地 用于查询。如果它是唯一索引,唯一性属性也 不成立。
indcheckxmin bool   If true, queries must not use the index until the xmin of this pg_index row is below their TransactionXmin event horizon, because the table may contain broken HOT chains with incompatible rows that they can see
indisready bool   如果为真,表示此索引当前可以用于插入。 为假表示索引必须被INSERT/UPDATE操作忽略。
indkey int2vector pg_attribute.attnum This is an array of indnatts values that indicate which table columns this index indexes. For example a value of 1 3 would mean that the first and the third table columns make up the index key. A zero in this array indicates that the corresponding index attribute is an expression over the table columns, rather than a simple column reference.
indcollation oidvector pg_collation.oid For each column in the index key, this contains the OID of the collation to use for the index.
indclass oidvector pg_opclass.oid For each column in the index key, this contains the OID of the operator class to use. See pg_opclass for details.
indoption int2vector   This is an array of indnatts values that store per-column flag bits. The meaning of the bits is defined by the index's access method.
indexprs pg_node_tree   Expression trees (in nodeToString() representation) for index attributes that are not simple column references. This is a list with one element for each zero entry in indkey. Null if all index attributes are simple references.
indpred pg_node_tree   Expression tree (in nodeToString() representation) for partial index predicate. Null if not a partial index.

提交更正

译文有误、术语不当或页面显示问题,请到译文仓库 pgsty/pgdoc 报告译文问题。 英文原文本身的问题,请在当前版本的对应页面向上游反馈;上游不再修订已结束维护的版本。