Re: Schema and Namespace Oid confusion

From: ZongtianHou <zongtianhou(at)icloud(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Schema and Namespace Oid confusion
Date: 2018-12-29 01:10:01
Message-ID: 8A3712AA-BD1A-4575-B275-C512B7D4E086@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thank you very much, got it.
> On 28 Dec 2018, at 11:36 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> 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
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Frantz Song 2018-12-31 06:30:17 How to find the table which is not used in recent 3 month?
Previous Message Tom Lane 2018-12-28 15:39:42 Re: Schema and Namespace Oid confusion