RE: [GENERAL] OID - Mailing list pgsql-general

From Jackson, DeJuan
Subject RE: [GENERAL] OID
Date
Msg-id F10BB1FAF801D111829B0060971D839F5E9116@cpsmail
Whole thread Raw
List pgsql-general
> I'm designing a database schema and have questions about OID.
>
> First, I assume that OID are system assigned? [yes]
yes - correct assumption
> Second, Can I use OID as a primary key? [no]
yes(qualified) - incorrect assumption
Currently PostgreSQL doesn't really do anything special with primary key
columns, so you can achieve the same affect, by declaring a UNIQUE INDEX
on the same columns.

> Third, Is the OID invariant under an import/export process? [no]
yes(qualified) - incorrect assumption
see: pg_dump --help (specifically the -o option).

> Fourth, Can I create table with an OID type for referencing another
> table? [no]
yes - incorrect assumption
This is part of the reason for the -o switch in pg_dump.

> I puy my assumed answers in brackets.  Please let me know if I
> am mistaken.
Well, only 75%.

> Thanks!
You're welcome.

> Clark
    -DEJ

pgsql-general by date:

Previous
From: Evan Howarth
Date:
Subject: RE: [GENERAL] OID
Next
From: Bob Dusek
Date:
Subject: Re: [GENERAL] Query is too long