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

From Josh Berkus
Subject Re: Question on oid's
Date
Msg-id web-1233933@davinci.ethosmedia.com
Whole thread Raw
In response to Question on oid's  ("Juliet May" <jmay@speark.com>)
List pgsql-novice
Juliet,

> My first question is about oid's. What are they exactly and when
> should/shouldn't I use them. I had trouble finding any information on
> them in either the online documentation or the online books. I'm
> using pgadmin to develop my database and I noticed that once I select
> or don't select oid that I can't change my mind.

We need a FAQ on this.  Sigh.

OIDs are for system use.  Occasionally some developers will build
transaction tables, to which thousands or millions of records will be
written and erased per day.  For that case (and that case only) they
will build "OID-less tables" in Postgres 7.2.

Otherwise, you should build your tables with OIDs, but then ignore the
OIDs and not use them as an index.  The system helps by "hiding" the
OID column from you.

Should you run across documentation suggesting that you use the OID as
an index or primary, key, that documentation is outdated.

-Josh Berkus




pgsql-novice by date:

Previous
From: "PG Explorer"
Date:
Subject: Re: Question on oid's
Next
From: "Joseph Molnar"
Date:
Subject: Re: Question on oid's