Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgqGE-0006Ab-75 for pgsql-docs@arkaria.postgresql.org; Sat, 30 Oct 2021 15:27:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mgqGC-0006gh-PM for pgsql-docs@arkaria.postgresql.org; Sat, 30 Oct 2021 15:27:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgqGC-0006gY-Ig for pgsql-docs@lists.postgresql.org; Sat, 30 Oct 2021 15:27:08 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgqG9-000801-Us for pgsql-docs@lists.postgresql.org; Sat, 30 Oct 2021 15:27:07 +0000 Received: from [192.168.178.34] ([77.181.27.144]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MFslN-1mQbmq1Qn1-00HPbe for ; Sat, 30 Oct 2021 17:27:03 +0200 Subject: Re: Be more clear what names can be used for tables with "CREATE TABLE"? To: pgsql-docs@lists.postgresql.org References: From: =?UTF-8?Q?J=c3=bcrgen_Purtz?= Message-ID: <998c5708-95f9-d58f-4480-5890b56138f7@purtz.de> Date: Sat, 30 Oct 2021 17:27:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------4F9133AE6D21B5D535857D43" Content-Language: en-US X-Provags-ID: V03:K1:xFSC+ZQDAFAwnrG8IruBCNtdTCV0R2dySgY5AWUCbNG0mf6wo0Y UPQfTWN+UMBYpXee6VM6aUYftrhaOtO8Ts+yBK5zuJKieNihm73so3jGDEpI2LlwkZjyEJ5 VykWQO2k3BUQvOakBn50aufOvCufXUsr4yMrXwSO4DHYOFuVHnE0mCaYowtXqyz7VmCabAK V2F/fHhI23w9XBzQMtTHQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:b/kOYKT4b0E=:T/ufG3imGXbZZyPZUWT/wW ABtBP+EWFc0wAPMIRsYwb23sHO750gSUrAtn7FmZW4vqkokBpFE5pffzzR1JgQnBdQRiRGlCB 3SQ/qXoC9aFQ8bnMqaF1irvCP5nxEVU10SPW+YRxWPJrNRuP0m+Hs/k5nguq66SGfOnhGBMaw PvGP6yoa6CpSHIlWW50Emys9jAd2Lk1AoM2k1SrO2IC4/6Lj4mLro+61JLy7MZRYMzRgBTUu5 QLmG/MagB178wJ14Y2xPx+lK3Ee2UST2nEE8gQJ0Q+8vQFPZjBGQTx1P5i/QKhjJ6tj+WtL4j XJEFL9zZud1nTDHjHIzbDS9A2LyqeWDeW+MtZU7IObjz1gRUYANioApAVDJ0zfu4IFmFzfXxR OO/DeZuRQAAy9C6OAjk8hbZJFmijpQRVsZjNmcLmnuigxcuE4O0FJLmvIVAYqzeytnODqiBPN zZm2DAItPASZqHulOgdYLMheeecm9RAonx0LEjDFlopqw5JoSKL3qwD/ER1RnjdhzhPDta2RJ dp4J0sNFiCaZMhdsh4PF1/b2TqhNXf2VUqFG0zoz9GH0el048VLh9ARwE2OMUOaj1tZTYkujN X9Yr9/iQZYAXRvBqD6V7bKVrFzFu1ds4wIOj6Mr5QmTAwUySdluoiUA4+upiPje/sdIgt3Nl6 nO1nfKNeXQ5DywnLlF0VaMIlLDF7yKRTqFFmjr16cqmOUis+xHCuyltz8svARKn/JQBE= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------4F9133AE6D21B5D535857D43 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit a) Don't forget: constraint, function, procedure, trigger. b) The hint applies to each of such objects: CREATE [TABLE|VIEW|FUNCTION|...]. To avoid such redundancy we could extend and clarify the definition of 'SQL object / local object / global object' within the glossary and refer to it. c) In general we have 3 levels (namespaces) where object names are unique across the same or different types. * cluster-level: database name, tablespace, replication origin, subscription for logical replication, role, ...? * database-level: schema, extension, collation, data type cast, ...? * schema-level: table, index, view, materialized view, foreign table, sequence, constraint, function, procedure, trigger, operator, ...? -- Jürgen Purtz --------------4F9133AE6D21B5D535857D43 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

a) Don't forget: constraint, function, procedure, trigger.

b) The hint applies to each of such objects: CREATE [TABLE|VIEW|FUNCTION|...]. To avoid such redundancy we could extend and clarify the definition of 'SQL object / local object / global object' within the glossary and refer to it.

c) In general we have 3 levels (namespaces) where object names are unique across the same or different types.

  • cluster-level: database name, tablespace, replication origin, subscription for logical replication, role, ...?
  • database-level: schema, extension, collation, data type cast, ...?
  • schema-level: table, index, view, materialized view, foreign table, sequence, constraint, function, procedure, trigger, operator, ...?

--

Jürgen Purtz

--------------4F9133AE6D21B5D535857D43--