Re: Using oids

From: Jonathan Bartlett <johnnyb(at)eskimo(dot)com>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using oids
Date: 2003-09-03 19:55:18
Message-ID: Pine.GSU.4.44.0309031253190.23907-100000@eskimo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Bartlett 2003-09-03 19:58:30 Re: Using oids
Previous Message Bruno Wolff III 2003-09-03 19:49:05 Re: How many memory size takes numeric(3,0) ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-09-03 19:57:15 Re: Need for a 'minor patch person'?
Previous Message Larry Rosenman 2003-09-03 19:53:39 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)