Re: OID's

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Jamie Deppeler <jamie(at)doitonce(dot)net(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: OID's
Date: 2004-11-15 07:05:38
Message-ID: C1651AFD-36D4-11D9-A99E-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 15, 2004, at 3:52 PM, Jamie Deppeler wrote:

> Hi,
>
> I am planning to use OID for referencing as instead PK -->> FK on
> this situation would require alot of tables, OID would seen to nice
> solution.
>
> My worry with OID's is when i do SQL dump and rebuild the Database
> will OID will change making referencing certain  records impossible.

Don't use OIDS. Just add a nice SERIAL column to the tables you want as
foreign keys (and if you have questions about sequences, check the
FAQ).

OIDS are a system level implementation. They are no longer required
(you can make tables without OIDS) and they may go away someday. Plus,
you avoid nastiness like OID wraparound.

Michael Glaesemann
grzm myrealbox com

(Is it just me, or have there been a slew of these OID posts lately?)

In response to

  • OID's at 2004-11-15 06:52:45 from Jamie Deppeler

Responses

  • Re: OID's at 2004-11-15 07:22:01 from Michael Glaesemann
  • Re: OID's at 2004-11-16 09:01:24 from Joolz
  • Re: OID's at 2004-11-16 11:06:57 from Kostis Mentzelos

Browse pgsql-general by date

  From Date Subject
Next Message Fernando Fernández 2004-11-15 07:17:32 Re: [webmaster] Question
Previous Message Jamie Deppeler 2004-11-15 06:59:02 OID