Re: create table explicitly mention that unique|primary key constraint will create an

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: create table explicitly mention that unique|primary key constraint will create an
Date: 2024-01-18 14:54:26
Message-ID: f0f2ecbc-3237-4cf7-8fb3-b8eb2b039bf8@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 27.11.23 03:30, Laurenz Albe wrote:
> True; I don't find it documented that all objects in pg_class share a
> namespace and that constraints are implemented by indexes of the same
> name. But I think that the first part is a property of schemas and had
> better be documented there.

It is documented prominently on the CREATE INDEX reference page. We
could document it in more places, of course. I find the specific change
proposal for ddl.sgml a bit weird, though, because this is a very
introductory section, and you are referring people to pg_class (what is
that?!?) for details. If we want to put something there, it should
respect the order in which that chapter introduces concepts.

The changes on create_table.sgml seem ok. Although I had actually
expected that the system applies the find-a-unique-name routine rather
than taking the constraint name for the index name unaltered.

Perhaps taking the create_table.sgml changes and combination with the
existing text on CREATE INDEX is sufficient.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2024-01-18 21:21:55 Re: create table explicitly mention that unique|primary key constraint will create an
Previous Message David G. Johnston 2024-01-18 13:35:53 Re: Creating the scripts and compiling the C files containing user-defined functions and types.