Re: OID's

From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: olly(at)lfix(dot)co(dot)uk
Cc: leen(at)wirehub(dot)nl, pgsql-general(at)postgresql(dot)org
Subject: Re: OID's
Date: 2004-10-23 17:32:57
Message-ID: 200410231732.i9NHWwWT030353@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You are correct. nextval() is guaranteed never to give the same number
> (unless setval() were used to reset the sequence value).

Or unless the sequence wraps around. That's less likely (and less
dangerous) than having the OID wrap around, but not impossible.

I personally believe that there is value in a database-generated unique
value like Oracle's ROWID. (Part of what I like about it is that since
it is a system column it simplifies some application issues, since the
app never has to worry about that column unless it chooses to.)

Making the OID sufficiently large to avoid virtually all wraparound
issues would probably mean going to a 64 bit field, which would certainly
be a non-trivial task.
--
Mike Nolan

In response to

  • Re: OID's at 2004-10-23 16:31:45 from Oliver Elphick

Responses

  • Re: OID's at 2004-10-23 18:05:55 from Dennis Bjorklund
  • Re: OID's at 2004-10-23 18:36:37 from Tom Lane

Browse pgsql-general by date

  From Date Subject
Next Message Gary Doades 2004-10-23 18:00:43 Re: Win installed pgsql 8.0 beta2 dev3
Previous Message A. Mous 2004-10-23 16:42:06 Win installed pgsql 8.0 beta2 dev3