Re: About OIDs - Mailing list pgsql-general

From Jonathan Bartlett
Subject Re: About OIDs
Date
Msg-id Pine.GSU.4.44.0303271310560.23470-100000@eskimo.com
Whole thread Raw
In response to About OIDs  (Flower Sun <sun_2002_flower@yahoo.com>)
Responses Re: About OIDs  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-general
The OID concept is great.  Sadly, since they are only 32-bit they can be
problematic.  I usually create tables without OIDS and create a field
called object_id of type int8 that uses a global sequence called
'objects'.

The advantage OIDs still have is that OIDs are shown in the data
dictionary.Therefore, with OIDs, you can write a script to merge two
records, and search the data dictionary for any OID-related fields, and
update the related fields with the new OID for the merged record.  This
works even if you don't know what tables and columns may be referencing
your table beforehand.

Anyway, that's my take.  I'm interested in what other developers have to
say.

Jon

On Thu, 27 Mar 2003, Flower Sun wrote:

>
> Hi, group,
>
> (1) I found system tables are all created without OIDs.
> But the default behavior of creating user tables are with OIDs.
> Is there any benefit to create user tables with OIDs?
>
>
> (2) I heard that OID usage at row level will be a future problems.
>
>
> (3) What's your preference to create table with OIDs or not.
>
> (4) Will drop the whole database release used OIDs?
>
> Thank you
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!


pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: file in data doesn't correspond to any oid in pg_class?
Next
From: Tom Lane
Date:
Subject: Re: file in data doesn't correspond to any oid in pg_class?