-
+
Data Definition
+ Adding a unique constraint will automatically create a unique btree
+ index on the column or group of columns used in the constraint.
+
+
with unique constraints
uniquely.
+ Adding a primary key will automatically create a unique btree index
+ on the column or group of columns used in the primary key.
+
+
A table can have at most one primary key. (There can be any number
of unique and not-null constraints, which are functionally the same
column is changed (updated). The possible actions are the same.
+ Since a DELETE of a row from the referenced table
+ or an UPDATE of a referenced column will require
+ a scan of the referencing table for rows matching the old value, it
+ is often a good idea to index the referencing columns. Because this
+ is not always needed, and there are many choices available on how
+ to index, declaration of a foreign key constraint does not
+ automatically create an index on the referencing columns.
+
+
More information about updating and deleting data is in
linkend="dml">.
See also CREATE
TABLE ... CONSTRAINT ... EXCLUDE> for details.
+
+ Adding an exclusion constraint will automatically create an index
+ of the type specified in the constraint declaration.
+