Re: Using oid as pkey

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using oid as pkey
Date: 2007-08-20 22:10:25
Message-ID: 449E8EE1-EB20-4AB0-8D4E-FEDB99611D31@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 20, 2007, at 16:58 , Ed L. wrote:

> What are the concerns with using oid as the column for a primary
> key declaration for use in trigger-based replication?

Just don't. oids are intended to be used by the database server
itself rather than as part of the user-defined data. If you're
looking for a auto-generated integer to use as a primary key, use
SERIAL. You'd have to specify your table WITH OIDS anyway as they're
no longer used by default for table rows, so there's really nothing
to be gained by using oids.

Michael Glaesemann
grzm seespotcode net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-08-20 22:30:48 Re: Using oid as pkey
Previous Message Ed L. 2007-08-20 21:58:17 Using oid as pkey