pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Daniel Westermann (DWE) <daniel.westermann@dbi-services.com>
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Date: Mon, 01 Nov 2021 05:39:43 +0100
Message-ID: <13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at> (raw)
In-Reply-To: <ZR0P278MB0920D0946509233459AF0DEFD2889@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM>
References: <ZR0P278MB0920D0946509233459AF0DEFD2889@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM>

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






view thread (8+ messages)  latest in thread

Message-ID: <13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at>
Permalink:  ../13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at/
Also on:    postgresql.org/message-id/13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, daniel.westermann@dbi-services.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Be more clear what names can be used for tables with "CREATE TABLE"?
  In-Reply-To: <13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox