Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: David Rowley <dgrowleyml@gmail.com>
Cc: gparc@free.fr, pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Date: 2024-01-26T13:53:41Z
Lists: pgsql-bugs

Attachments

On Sat, 2024-01-27 at 02:19 +1300, David Rowley wrote:
> On Sat, 27 Jan 2024 at 01:14, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> 
> I'd only adjust the following addition to be a new paragraph:

Check.

> and drop the "also" at the same time.

Done.

> I also noticed that, generally, we're not that consistent if we spell
> it "foreign-key" or "foreign key".  You're introducing "foreign key"
> in a location where there are a couple of "foreign-key"s. Maybe it's
> better to be consistent in at least that location?

Yes, you are right.  I noticed that everywhere else on the page the
form "foreign key" is used, so that's what I did in the attached patch.

Yours,
Laurenz Albe

Commits

  1. Doc: mention foreign keys can reference unique indexes