pgsql: Doc: mention foreign keys can reference unique indexes

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Doc: mention foreign keys can reference unique indexes
Date: 2024-01-29 21:16:35
Message-ID: E1rUYzb-003juM-8W@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6fc8a7b2b03bfcb26e2e7440251b6f17e01210c8

Modified Files
--------------
doc/src/sgml/ddl.sgml | 20 ++++++++++----------
doc/src/sgml/ref/create_table.sgml | 19 +++++++++++++------
src/backend/commands/tablecmds.c | 14 +++++++++-----
3 files changed, 32 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2024-01-29 21:16:59 pgsql: Doc: mention foreign keys can reference unique indexes
Previous Message David Rowley 2024-01-29 21:16:09 pgsql: Doc: mention foreign keys can reference unique indexes