| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> | 
|---|---|
| To: | "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: Be more clear what names can be used for tables with "CREATE TABLE"? | 
| Date: | 2021-11-01 04:39:43 | 
| Message-ID: | 13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Doc comments form | 2021-11-01 13:23:01 | Empty values of pg_stats_ext when table is empty | 
| Previous Message | Daniel Westermann (DWE) | 2021-10-31 19:48:15 | Re: Be more clear what names can be used for tables with "CREATE TABLE"? |