From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: ZongtianHou <zongtianhou@icloud.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Schema and Namespace Oid confusion
Date: Fri, 28 Dec 2018 12:36:14 -0300
Message-ID: <201812281536.wlr7arvxlfsk@alvherre.pgsql> (raw)
In-Reply-To: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com>
Hello
On 2018-Dec-28, ZongtianHou wrote:
> I get somehow confused when I learn about namespace here, there are two questions,
> First, what is the difference between namespace and schema?
None. Schema is the user-visible name for the feature; namespace is the
source code and system catalog level.
> Second, why the Oid of public namespace is 2200, the same between
> databases?
Not necessarily. That's the initial value, but it's possible to drop
the public schema and create it afresh.
> Does oid is unique for every object across cluster?
No, only inside each individual catalog are OIDs guaranteed unique.
> Does someone know about these clearly?
Yes.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: alvherre@2ndquadrant.com, zongtianhou@icloud.com
Subject: Re: Schema and Namespace Oid confusion
In-Reply-To: <201812281536.wlr7arvxlfsk@alvherre.pgsql>
* 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