Re: find column OID types with information schema?

From: Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: find column OID types with information schema?
Date: 2009-04-27 17:26:31
Message-ID: 8ec76080904271026j4c294be3s5cad08583f226d32@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ok, got it.

thanks for the clarification and the hand holding.

-Whit

On Mon, Apr 27, 2009 at 1:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com> writes:
>> Am I misinterpreting this documentation?  Are there cases in which the
>> OID's of two tables will collide?  I don't see any uniqueness
>> constraints on the pg_class table.
>
> You didn't look too hard:
>
> regression=# \d pg_class
> ...
> Indexes:
>    "pg_class_oid_index" UNIQUE, btree (oid)
>    "pg_class_relname_nsp_index" UNIQUE, btree (relname, relnamespace)
>
> All system catalogs that have OIDs at all effectively treat them as a
> primary key.  If they weren't unique identifiers they wouldn't be good
> for much ...
>
> What the documentation is trying to point out is that the uniqueness
> guarantees don't extend across tables.  So for example a table and a
> datatype could by coincidence have the same OID, since they live in
> different system catalogs.
>
>                        regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Schwarzenbach 2009-04-27 17:41:19 Re: PostgreSQL Object-Oriented Database?
Previous Message Tom Lane 2009-04-27 17:09:46 Re: find column OID types with information schema?