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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: gparc(at)free(dot)fr, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key
Date: 2024-01-26 13:19:13
Message-ID: CAApHDvpMps521Pih_ccrffzyv0SFtC0TuB6vULqhrrxzfW+o3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, 27 Jan 2024 at 01:14, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> Attached is a modified patch.

I think it looks mostly fine.

I'd only adjust the following addition to be a new paragraph:

- <title>Foreign-Key Constraint Actions</title>
+ <title>Foreign-Key Constraints</title>

<para>
The ability to specify column lists in the foreign-key actions
<literal>SET DEFAULT</literal> and <literal>SET NULL</literal> is a
<productname>PostgreSQL</productname> extension.
+ It is also a <productname>PostgreSQL</productname> extension that a
+ foreign key constraint may reference a unique index instead of a
+ primary key or unique constraint.
</para>

and drop the "also" at the same time.

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?

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2024-01-26 13:53:41 Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key
Previous Message PG Bug reporting form 2024-01-26 13:06:03 BUG #18313: No error triggered when subtracting an interval from a timestamp