Re: Schema and Namespace Oid confusion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ZongtianHou <zongtianhou(at)icloud(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Schema and Namespace Oid confusion
Date: 2018-12-28 15:39:42
Message-ID: 22060.1546011582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

ZongtianHou <zongtianhou(at)icloud(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message ZongtianHou 2018-12-29 01:10:01 Re: Schema and Namespace Oid confusion
Previous Message Alvaro Herrera 2018-12-28 15:36:14 Re: Schema and Namespace Oid confusion