Re: Question on oid's - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Question on oid's
Date
Msg-id web-1234330@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Question on oid's  ("Joseph Molnar" <josephmolnar@hotmail.com>)
List pgsql-novice
Joe,

> I am also new to Postgresql though not ORDBMS systems ... why should
> you not
> use OIDs as a primary key in Postgresql?

1. OIDs are not normally backed up, and it requires special pg_dump
options to backup and restore them, and there can be problems in this
process.
2. If you have a very large database with  a lot of activity, the OID
counter will "roll over" which is not a problem for the system, but
will be for any OID-based primary keys.
3. It's not great design to make a column which is normally hidden in
queries your primary key.

-Josh Berkus

pgsql-novice by date:

Previous
From: "Joseph Molnar"
Date:
Subject: Re: Question on oid's
Next
From: "Patrick Hatcher"
Date:
Subject: Perl query error