pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: mention foreign keys can reference unique indexes
Date: Mon, 29 Jan 2024 21:17:52 +0000
Message-ID: <E1rUZ0q-003jwr-Pa@gemulon.postgresql.org> (raw)

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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dff1756c392ec7e3ac9b0b4bb2112a594765902a

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, 34 insertions(+), 19 deletions(-)



view thread (6+ messages)

Message-ID: <E1rUZ0q-003jwr-Pa@gemulon.postgresql.org>
Permalink:  ../E1rUZ0q-003jwr-Pa@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rUZ0q-003jwr-Pa@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Doc: mention foreign keys can reference unique indexes
  In-Reply-To: <E1rUZ0q-003jwr-Pa@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox