From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Daniel Westermann (DWE) <daniel.westermann@dbi-services.com>
Cc: 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 12:04:16 -0400
Message-ID: <1139298.1635782656@sss.pgh.pa.us> (raw)
In-Reply-To: <13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at>
References: <ZR0P278MB0920D0946509233459AF0DEFD2889@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM>
<13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at>
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 the same 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
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: tgl@sss.pgh.pa.us, 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: <1139298.1635782656@sss.pgh.pa.us>
* 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