Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: "Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>, "pgsql-docs@lists.postgresql.org" <pgsql-docs@lists.postgresql.org>
Date: 2021-11-01T04:39:43Z
Lists: 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 the same 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 the table. > 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
Commits
-
Doc: be more precise about conflicts between relation names.
- af8c580e5cf3 15.0 landed