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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key
Дата
Msg-id CAApHDvpMps521Pih_ccrffzyv0SFtC0TuB6vULqhrrxzfW+o3w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-bugs
On Sat, 27 Jan 2024 at 01:14, Laurenz Albe <laurenz.albe@cybertec.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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18313: No error triggered when subtracting an interval from a timestamp
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key