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

From Laurenz Albe
Subject Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Date
Msg-id 13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at
Whole thread Raw
In response to Be more clear what names can be used for tables with "CREATE TABLE"?  ("Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>)
Responses Re: Be more clear what names can be used for tables with "CREATE TABLE"?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
On Sat, 2021-10-30 at 11:08 +0000, Daniel Westermann (DWE) wrote:
> HI all,
> 
> 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:
> 
> Domains are also missing:
> 
> ... but that maybe is covered by the next paragraph?
> 
> "CREATE TABLE also automatically creates a data type that represents the composite type corresponding to one row of
thetable.
 
> Therefore, tables cannot have the same name as any existing data type in the same schema."

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

Perhaps we can refer to the documentation of "pg_class", which will in turn refer you to "relkind".

Yours,
Laurenz Albe




pgsql-docs by date:

Previous
From: "Daniel Westermann (DWE)"
Date:
Subject: Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Next
From: PG Doc comments form
Date:
Subject: Empty values of pg_stats_ext when table is empty