From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-26 13:31:32 |
Message-ID: | CALDaNm0=YqFkMSiZO42dEcD2_qa+5Xvfuu+hbYnVQ5ii+c2kfw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Fri, 19 Jan 2024 at 16:16, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Thu, 2024-01-18 at 15:54 +0100, Peter Eisentraut wrote:
> > 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.
>
> Ah, I didn't see the CREATE INDEX page. (As an aside: too much
> conceptual stuff is documented in our reference pages, but that's a
> different issue.)
>
> For me, the intuitive place to look for information like that is the
> "Data Definition" chapter, so I think we should mention it there.
> I agree that "pg_class" is too advanced for that chapter, even though
> there is an earlier reference to it under "System Columns".
>
> In the attached patch, I have copied the enumeration of relations from
> the CREATE INDEX page. I think this small redundance is alright, but I
> wouldn't mind if this gets removed from CREATE INDEX.
>
> The rest is unmodified.
CFBot shows that the patch does not apply anymore as in [1]:
=== Applying patches on top of PostgreSQL commit ID
d282e88e50521a457fa1b36e55f43bac02a3167f ===
=== applying patch ./v3-0001-Doc-All-relations-share-a-namespace.patch
...
patching file doc/src/sgml/ref/create_table.sgml
Hunk #1 FAILED at 1001.
Hunk #2 FAILED at 1054.
Hunk #3 succeeded at 1118 (offset 27 lines).
2 out of 3 hunks FAILED -- saving rejects to file
doc/src/sgml/ref/create_table.sgml.rej
Please post an updated version for the same.
[1] - http://cfbot.cputube.org/patch_46_4747.log
Regards,
Vignesh
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-01-26 15:37:35 | Re: create table explicitly mention that unique|primary key constraint will create an |
Previous Message | Laurenz Albe | 2024-01-26 11:03:03 | Re: SQL command : ALTER DATABASE OWNER TO |