Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuEm-0007Lj-Uq for pgsql-admin@arkaria.postgresql.org; Fri, 28 Dec 2018 15:39:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gcuEl-00072V-HV for pgsql-admin@arkaria.postgresql.org; Fri, 28 Dec 2018 15:39:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuEl-00072O-A0 for pgsql-admin@lists.postgresql.org; Fri, 28 Dec 2018 15:39:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuEj-0004tB-8D for pgsql-admin@postgresql.org; Fri, 28 Dec 2018 15:39:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wBSFdgWI022061; Fri, 28 Dec 2018 10:39:42 -0500 From: Tom Lane To: ZongtianHou cc: pgsql-admin Subject: Re: Schema and Namespace Oid confusion In-reply-to: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com> References: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com> Comments: In-reply-to ZongtianHou message dated "Fri, 28 Dec 2018 20:44:27 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22059.1546011582.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 28 Dec 2018 10:39:42 -0500 Message-ID: <22060.1546011582@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ZongtianHou writes: > First, what is the difference between namespace and schema? None. > Second, why the Oid of public namespace is 2200, the same between databa= ses? Does oid is unique for every object across cluster? = CREATE DATABASE physically clones the template database, so all objects have the same OIDs they had in the template. OID uniqueness is only expected for objects within one database (and even then, only across objects in the same system catalog), not across the whole cluster. regards, tom lane