pub struct IndexInfo {Show 19 fields
pub table: u32,
pub keys: Vec<i16>,
pub key_count: i16,
pub unique: bool,
pub nulls_not_distinct: bool,
pub primary: bool,
pub immediate: bool,
pub method: u32,
pub collations: Vec<u32>,
pub classes: Vec<u32>,
pub options: Vec<i16>,
pub exprs: Option<String>,
pub predicate: Option<String>,
pub pages: i32,
pub clustered: bool,
pub replica_identity: bool,
pub valid: bool,
pub ready: bool,
pub parent: u32,
}Expand description
The facts of an index, one row of pg_index.
Fields§
§table: u32The OID of the table.
keys: Vec<i16>The column number of each index column in the table, or 0 for an expression.
key_count: i16The number of key columns. The rest are INCLUDE columns.
unique: boolindisunique.
nulls_not_distinct: boolindnullsnotdistinct.
primary: boolindisprimary.
immediate: boolindimmediate: false for a deferrable constraint.
method: u32The OID of the access method.
collations: Vec<u32>The collation of each key column, indcollation.
classes: Vec<u32>The operator class of each key column, indclass.
options: Vec<i16>The options of each key column, indoption.
exprs: Option<String>The expressions of the index columns with key 0, in the form of the analyzer.
predicate: Option<String>The predicate of a partial index, in the form of the analyzer.
pages: i32relpages of the index: the pages of the main fork when the index is new.
clustered: boolindisclustered: CLUSTER ON chose the index.
replica_identity: boolindisreplident: REPLICA IDENTITY USING INDEX chose the index.
valid: boolindisvalid: false for an index of a partitioned table that a partition does not have yet, and for an index of CREATE INDEX CONCURRENTLY whose build failed.
ready: boolindisready: false for an index of CREATE INDEX CONCURRENTLY whose build failed. Such an index does not check the keys of new rows.
parent: u32The index of the parent table that the index is a partition of, from pg_inherits, or 0.