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

From: Richard Huxton <dev(at)archonet(dot)com>
To: songsubo <songsubo(at)163(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert may fail if i create a primary key on the oid
Date: 2004-11-24 11:42:53
Message-ID: 41A473BD.5010708@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francis Reed 2004-11-24 12:30:28 Moving/Using Postgres Binaries on multiple machines
Previous Message Michael Glaesemann 2004-11-24 11:33:02 Re: Insert may fail if i create a primary key on the oid column?