Insert may fail if i create a primary key on the oid column?

Started by songsuboover 21 years ago3 messagesgeneral
Jump to latest
#1songsubo
songsubo@163.com

I create a primary key on the "oid" column. The oid is generate by system itself. The oid may overlap, when this happen, this operation may fail?

#2Michael Glaesemann
grzm@seespotcode.net
In reply to: songsubo (#1)
Re: Insert may fail if i create a primary key on the oid column?

On Nov 24, 2004, at 8:18 PM, songsubo wrote:

I create a primary key on the "oid" column. The oid is generate by
system itself. The oid may overlap, when this happen, this operation
may fail?

Yes. Check the mailing list archives, as this was just recently
discussed.

Michael Glaesemann
grzm myrealbox com

#3Richard Huxton
dev@archonet.com
In reply to: songsubo (#1)
Re: Insert may fail if i create a primary key on the oid

songsubo wrote:

I create a primary key on the "oid" column. The oid is generate by
system itself. The oid may overlap, when this happen, this operation
may fail?

Yes. If you want a self-incrementing primary key, why not use a SERIAL type?

--
Richard Huxton
Archonet Ltd