RE: OID as Primary Key - Mailing list pgsql-general

From Jonas Bengtsson
Subject RE: OID as Primary Key
Date
Msg-id NEBBLNLDOLDEJIKDPCBOMEDNCDAA.jonas.b@home.se
Whole thread Raw
In response to RE: OID as Primary Key  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Why doesn't PostgreSQL has the same feature as MySQL (auto_increment) when
dealing with PK? In nearly every relation I use a SERIAL.
In PHP with MySQL you just use mysql_insert_id() instead of double queries.

I have to admit that I like PostgreSQL a lot more than MySQL. Is there any
good, objective, comparison between these to available? I'm mostly
interested in the performance.

/Jonas B

-----Original Message-----
From: Stephan Szabo [mailto:sszabo@megazone23.bigpanda.com]
Sent: Thursday, March 22, 2001 6:09 PM
To: Jonas Bengtsson
Cc: pgsql-general@postgresql.org
Subject: RE: [GENERAL] OID as Primary Key


You can create indexes on them. It's specifically
a limitation in the fk related code.  IIRC, there
were a couple of places in the triggers that
would fail on execution if you tried to reference
oid, so it now fails on creation rather than
execution of constraints.  There are a bunch
of things that need to get done to those triggers
anyway, so possibly for 7.2.

On Thu, 22 Mar 2001, Jonas Bengtsson wrote:

> But why doesn't PostgreSQL complain when a create a unique index on oid? I
> think it is quite confusing..


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: RE: OID as Primary Key
Next
From: Stephan Szabo
Date:
Subject: Re: creating a trigger to write to a different table