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 1mhP6t-0006Iq-QJ for pgsql-docs@arkaria.postgresql.org; Mon, 01 Nov 2021 04:39:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhP6s-0006BN-O7 for pgsql-docs@arkaria.postgresql.org; Mon, 01 Nov 2021 04:39:50 +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 1mhP6s-0006BE-HH for pgsql-docs@lists.postgresql.org; Mon, 01 Nov 2021 04:39:50 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mhP6o-0006HN-DZ for pgsql-docs@lists.postgresql.org; Mon, 01 Nov 2021 04:39:50 +0000 Received: by mail-wr1-x433.google.com with SMTP id u18so26388556wrg.5 for ; Sun, 31 Oct 2021 21:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=3a4peG9ufp7pP/pM5qyLXlmMt5eXmeOW5KbF4sXgdX0=; b=mGS7GzjOeRxLYaWGNAnbQeIkyw8A8O515F1IT43N7pCaYLxF3kcIA8mXQOPSJm00Tg O/AAoxjYEPh0Wu/yuO/M21Vzrybl1BfOQbTPtGIxTUsqRGwCergfidtkEqczIN9bW15/ 0pgEGhU86FRfUCPy3YPFV+Fyx2Mi10/+0qd4uAhTMw/fbgC+cTNNxEV47PCgU8kT2HSh 7EtuO4hU/HtuNQ8lOkM58r6IWEbCGusMzJFia5Qb9spcwNBZ3jWiVfe95D14VRIe34Zh 3INbwSSC10TRKY48u8Lxfns0adXMC4Wrv2tc6iwYpDjiiqEB6QCy9XVFn8LENEdtrXLK 5DEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=3a4peG9ufp7pP/pM5qyLXlmMt5eXmeOW5KbF4sXgdX0=; b=bFPNHmFPVI8QjhUZeW9TzX/1KM6Ae4yntsQeMbbG055LC9zp+O/pIxi9jATnBNAjFa XkrbU/WW2ne81lvaPIIg8w82P8/E5I6SZHIpXdkPh319i4x2lrElYVEZbQX84SSHBRwy F7nuNMvcXtl1C7UTSjtMcCXTm2nS3MLKzM7ZR4MnoNX3CyScNKl+C0KjQQ4dv6FmVYAa E6AVu/eY3P0KPiOf0SwLNOoSHTiOggLevN7S2EF44pMa/efjkjE3EiLxX2IwjjBJTWsQ dlm5WpEteSHsB6Vw7cVvLAw0E7q2d+it3c0naDGNw2OHOCYQU0IxLx9mwrg0QMzCRUfv +JEA== X-Gm-Message-State: AOAM532boW/GnVrZUleB5WsRrJUQ0KmR97GG783wVenNHl7aVWwTjzLl /aozpJZaos5sZFQdxID2DBExgA== X-Google-Smtp-Source: ABdhPJxLyauN3BDwmmsOL4EmNn0na1avrs3KRZhp+Eq1mbgD+3KFALzUOEBj3VlmoBrLiHRtnpCUgw== X-Received: by 2002:a05:6000:15cc:: with SMTP id y12mr35467375wry.333.1635741584589; Sun, 31 Oct 2021 21:39:44 -0700 (PDT) Received: from localhost.localdomain (62-47-151-123.adsl.highway.telekom.at. [62.47.151.123]) by smtp.gmail.com with ESMTPSA id f1sm12613029wrc.74.2021.10.31.21.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 21:39:44 -0700 (PDT) Message-ID: <13dcf5e60a2cdfd8ea68da9a2569287e342e87ab.camel@cybertec.at> Subject: Re: Be more clear what names can be used for tables with "CREATE TABLE"? From: Laurenz Albe To: "Daniel Westermann (DWE)" , "pgsql-docs@lists.postgresql.org" Date: Mon, 01 Nov 2021 05:39:43 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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