Обсуждение: 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?

От
"songsubo"
Дата:
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?

От
Michael Glaesemann
Дата:
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

От
Richard Huxton
Дата:
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