From: Tom Lane <tgl@sss.pgh.pa.us>
To: ZongtianHou <zongtianhou@icloud.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Schema and Namespace Oid confusion
Date: Fri, 28 Dec 2018 10:39:42 -0500
Message-ID: <22060.1546011582@sss.pgh.pa.us> (raw)
In-Reply-To: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com>
References: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com>
ZongtianHou <zongtianhou@icloud.com> writes:
> First, what is the difference between namespace and schema?
None.
> Second, why the Oid of public namespace is 2200, the same between databases? 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
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, zongtianhou@icloud.com
Subject: Re: Schema and Namespace Oid confusion
In-Reply-To: <22060.1546011582@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