On Sat, 2024-01-27 at 00:33 +1300, David Rowley wrote:
> On Fri, 26 Jan 2024 at 23:55, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > Attached is my suggested patch.
>
> Why did you choose to remove the mention of primary key and unique
> constraints in:
>
> - A foreign key must reference columns that either are a primary key or
> - form a unique constraint. This means that the referenced columns always
> - have an index (the one underlying the primary key or unique constraint);
> + A foreign key must reference columns on which a unique index in defined,
>
> but choose to keep them here:
>
> - unique or primary key constraint in the referenced table. The user
> + unique or primary key constraint or a unique index in the
>
> I'd rather we continue to mention primary keys and unique constraints
> in ddl.sgml. It just seems good practice to me to define a constraint
> and it seems better if people continue to do that to increase the
> likelihood that their schema is compatible with another RDBMS.
I removed the mention of constraints for simplicity, but I agree that the
documentation should encourage users to reference constraints.
Attached is a modified patch.
Yours,
Laurenz Albe