]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: mention foreign keys can reference unique indexes
authorDavid Rowley <drowley@postgresql.org>
Mon, 29 Jan 2024 21:16:17 +0000 (10:16 +1300)
committerDavid Rowley <drowley@postgresql.org>
Mon, 29 Jan 2024 21:16:17 +0000 (10:16 +1300)
commit6fc8a7b2b03bfcb26e2e7440251b6f17e01210c8
tree06c8d66471845492f2b4509fb744b9a9d2381dba
parent3726c1cb0e3bd18d8916978e18d95251d07360c3
Doc: mention foreign keys can reference unique indexes

We seem to have only documented a foreign key can reference the columns of
a primary key or unique constraint.  Here we adjust the documentation
to mention columns in a non-partial unique index can be mentioned too.

The header comment for transformFkeyCheckAttrs() also didn't mention
unique indexes, so fix that too.  In passing make that header comment
reflect reality in the various other aspects where it deviated from it.

Bug: 18295
Reported-by: Gilles PARC
Author: Laurenz Albe, David Rowley
Discussion: https://www.postgresql.org/message-id/18295-0ed0fac5c9f7b17b%40postgresql.org
Backpatch-through: 12
doc/src/sgml/ddl.sgml
doc/src/sgml/ref/create_table.sgml
src/backend/commands/tablecmds.c