*** a/doc/src/sgml/ddl.sgml
--- b/doc/src/sgml/ddl.sgml
***************
*** 550,555 **** CREATE TABLE products (
--- 550,560 ----
+ Adding a unique constraint will automatically create a unique btree
+ index on the column or group of columns declared for the constraint.
+
+
+
In general, a unique constraint is violated when there is more than
one row in the table where the values of all of the
columns included in the constraint are equal.
***************
*** 623,628 **** CREATE TABLE example (
--- 628,638 ----
+ Adding a primary key will automatically create a unique btree index
+ on the column or group of columns declared for 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
thing, but only one can be identified as the primary key.)
***************
*** 832,837 **** CREATE TABLE order_items (
--- 842,857 ----
+ Since a DELETE of a row from a 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 it
+ is not always needed, and there are many choices available on how
+ index, declaration of a foreign key constraint does not
+ automatically create an index.
+
+
+
More information about updating and deleting data is in .
***************
*** 875,880 **** CREATE TABLE circles (
--- 895,905 ----
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.
+