diff options
Diffstat (limited to 'doc/src/sgml/ddl.sgml')
-rw-r--r-- | doc/src/sgml/ddl.sgml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fc03a349f0f..0a0ff42e881 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1318,16 +1318,16 @@ CREATE TABLE posts ( <para> A foreign key must reference columns that either are a primary key or - form a unique constraint. This means that the referenced columns always - have an index (the one underlying the primary key or unique constraint); - so checks on whether a referencing row has a match will be efficient. - Since a <command>DELETE</command> of a row from the referenced table - or an <command>UPDATE</command> 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 too. 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. + form a unique constraint, or are columns from a non-partial unique index. + This means that the referenced columns always have an index to allow + efficient lookups on whether a referencing row has a match. Since a + <command>DELETE</command> of a row from the referenced table or an + <command>UPDATE</command> 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 too. Because this is not always + needed, and there are many choices available on how to index, the + declaration of a foreign key constraint does not automatically create an + index on the referencing columns. </para> <para> |