]> begriffs open source - ai-pg/blob - full-docs/txt/catalog-pg-index.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / catalog-pg-index.txt
1
2 52.26. pg_index #
3
4    The catalog pg_index contains part of the information about indexes.
5    The rest is mostly in pg_class.
6
7    Table 52.26. pg_index Columns
8
9    Column Type
10
11    Description
12
13    indexrelid oid (references pg_class.oid)
14
15    The OID of the pg_class entry for this index
16
17    indrelid oid (references pg_class.oid)
18
19    The OID of the pg_class entry for the table this index is for
20
21    indnatts int2
22
23    The total number of columns in the index (duplicates
24    pg_class.relnatts); this number includes both key and included
25    attributes
26
27    indnkeyatts int2
28
29    The number of key columns in the index, not counting any included
30    columns, which are merely stored and do not participate in the index
31    semantics
32
33    indisunique bool
34
35    If true, this is a unique index
36
37    indnullsnotdistinct bool
38
39    This value is only used for unique indexes. If false, this unique index
40    will consider null values distinct (so the index can contain multiple
41    null values in a column, the default PostgreSQL behavior). If it is
42    true, it will consider null values to be equal (so the index can only
43    contain one null value in a column).
44
45    indisprimary bool
46
47    If true, this index represents the primary key of the table
48    (indisunique should always be true when this is true)
49
50    indisexclusion bool
51
52    If true, this index supports an exclusion constraint
53
54    indimmediate bool
55
56    If true, the uniqueness check is enforced immediately on insertion
57    (irrelevant if indisunique is not true)
58
59    indisclustered bool
60
61    If true, the table was last clustered on this index
62
63    indisvalid bool
64
65    If true, the index is currently valid for queries. False means the
66    index is possibly incomplete: it must still be modified by
67    INSERT/UPDATE operations, but it cannot safely be used for queries. If
68    it is unique, the uniqueness property is not guaranteed true either.
69
70    indcheckxmin bool
71
72    If true, queries must not use the index until the xmin of this pg_index
73    row is below their TransactionXmin event horizon, because the table may
74    contain broken HOT chains with incompatible rows that they can see
75
76    indisready bool
77
78    If true, the index is currently ready for inserts. False means the
79    index must be ignored by INSERT/UPDATE operations.
80
81    indislive bool
82
83    If false, the index is in process of being dropped, and should be
84    ignored for all purposes (including HOT-safety decisions)
85
86    indisreplident bool
87
88    If true this index has been chosen as “replica identity” using ALTER
89    TABLE ... REPLICA IDENTITY USING INDEX ...
90
91    indkey int2vector (references pg_attribute.attnum)
92
93    This is an array of indnatts values that indicate which table columns
94    this index indexes. For example, a value of 1 3 would mean that the
95    first and the third table columns make up the index entries. Key
96    columns come before non-key (included) columns. A zero in this array
97    indicates that the corresponding index attribute is an expression over
98    the table columns, rather than a simple column reference.
99
100    indcollation oidvector (references pg_collation.oid)
101
102    For each column in the index key (indnkeyatts values), this contains
103    the OID of the collation to use for the index, or zero if the column is
104    not of a collatable data type.
105
106    indclass oidvector (references pg_opclass.oid)
107
108    For each column in the index key (indnkeyatts values), this contains
109    the OID of the operator class to use. See pg_opclass for details.
110
111    indoption int2vector
112
113    This is an array of indnkeyatts values that store per-column flag bits.
114    The meaning of the bits is defined by the index's access method.
115
116    indexprs pg_node_tree
117
118    Expression trees (in nodeToString() representation) for index
119    attributes that are not simple column references. This is a list with
120    one element for each zero entry in indkey. Null if all index attributes
121    are simple references.
122
123    indpred pg_node_tree
124
125    Expression tree (in nodeToString() representation) for partial index
126    predicate. Null if not a partial index.