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

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

From
"songsubo"
Date:
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? 




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

From
Michael Glaesemann
Date:
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


Re: Insert may fail if i create a primary key on the oid

From
Richard Huxton
Date:
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