Re: Be more clear what names can be used for tables with "CREATE TABLE"? - Mailing list pgsql-docs

From Tom Lane
Subject Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Date
Msg-id 1139298.1635782656@sss.pgh.pa.us
Whole thread Raw
In response to Re: Be more clear what names can be used for tables with "CREATE TABLE"?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Be more clear what names can be used for tables with "CREATE TABLE"?
List pgsql-docs
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Sat, 2021-10-30 at 11:08 +0000, Daniel Westermann (DWE) wrote:
>> in the documentation for CREATE TABLE we have this sentence:
>> "The name of the table must be distinct from the name of any other table, sequence, index, view, or foreign table in
thesame schema." 
>> At least materialized views are missing:

> Technically speaking, it is "objects stored in pg_class".

We use "relation" for that concept in the code, and I believe that
that terminology is also used in the manual.  I'm inclined to propose

"The name of the table must be distinct from the name of any other
relation (table, sequence, index, view, materialized view, or foreign
table) in the same schema."

I think the existing wording might be that way because somebody
figured that "view" could subsume "materialized view".  Which
isn't an unreasonable position, but we haven't done it like that
consistently.

I don't think we need to be similarly exhaustive about enumerating
the kinds of types that there are.

            regards, tom lane



pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Empty values of pg_stats_ext when table is empty
Next
From: PG Doc comments form
Date:
Subject: initdb: nothing about template0