Expand description
The checks of a PRIMARY KEY or UNIQUE constraint’s declaration and of its index, in the order PostgreSQL’s transformIndexConstraint and DefineIndex apply them.
Structs§
- KeyPartition
- A partition below the relation a key is defined on.
DefineIndexvisits each partition after its parent, siblings in partition bound order. - KeyRelation
- The relation a key’s index is built on.
Enums§
- Index
Owner - What owns an index, which names the index in an attribute error.
- Partition
KeyIndex - How a partition receives a key defined on its ancestor.
Functions§
- define_
partition_ key - A partition with an equivalent key adopts it. For any other partition
DefineIndexbuilds a new index: a primary key must not meet the partition’s own primary key, and the key must hold the partition’s own partition key columns. - index_
order - The keys one statement declares, in the order
transformIndexConstraintsbuilds their indexes: the primary key first, and a key whose index would repeat an earlier key’s index dropped, giving its name to that key when the earlier key has none. - is_
system_ column - Whether
nameis a system column, which every table has beside its own columns. - missing_
key_ column column "c" named in key does not exist, for a key or included column that the relation lacks.- multiple_
primary_ keys - A second primary key, reported with the relation’s own name.
- repeated_
key_ column - A key column named twice in one key.
- resolve_
system_ key_ attribute - A system column that is a key attribute needs an operator class of the index’s access method for its type. The transaction and command identifiers of
xmin,xmax,cminandcmaxhave one only for a hash index, and the tuple identifier ofctidhas one for a btree and a hash index; the object identifier oftableoidis ordered wherever integers are. - system_
column_ index index creation on system columns is not supported.- validate_
index_ attribute DefineIndexbuilds no index on a system column or on a virtual generated column.columnsare the relation’s columns, and a name outside them is a system column, which the index’s attributes have already been resolved to.- validate_
key_ definition - Validate a key as
DefineIndexdoes before it builds the key’s index onrelation: the index’s attributes are resolved in order, key columns before included columns; then a second primary key, the partition key, and each attribute as one an index can hold. - validate_
overlaps_ column - The
WITHOUT OVERLAPScolumn of a key must be a range or multirange column; a system column never is. - validate_
overlaps_ key_ length - A
WITHOUT OVERLAPSkey compares at least one column by equality besides its period.