Re: Using oids - Mailing list pgsql-general

From Jonathan Bartlett
Subject Re: Using oids
Date
Msg-id Pine.GSU.4.44.0309031253190.23907-100000@eskimo.com
Whole thread Raw
In response to Re: Using oids  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List pgsql-general
> About oids not being unique, oids can assume 4 billion different values. If you
> have more than those many rows in a table, oids will wrap around and will no
> longer be unique in that object.

Not quite.  After 4 billion inserts (even spread across millions of
tables), you run out of OIDs and they will no longer be unique.  OIDs I
think were originally meant to be globally unique identifiers, but they
are no longer so, and are really no longer useful.  When I want globally
unique identifiers, I use an int8 column + sequence.

Jon


pgsql-general by date:

Previous
From: Josué Maldonado
Date:
Subject: TCL trigger doesn't work after deleting a column
Next
From: Jonathan Bartlett
Date:
Subject: Re: Using oids