Re: OID Question

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Terry Lee Tucker <terry(at)esc1(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: OID Question
Date: 2004-11-11 18:15:36
Message-ID: 20041111101410.O34925@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Thu, 11 Nov 2004, Terry Lee Tucker wrote:

> Is it ok to put a unique index on the oid for my tables? We are in the process
> of moving from Progress Software to PostgreSQL. In the Progress world, you
> can always uniquely, and quickly find a record by using their version of oid,
> which is recid. I remember reading somewhere that the oid could be
> duplicated across the cluster, but would not be duplicated in a single table.
> Maybe I dreamed it. What is the recommendation regarding this and why?

Well, some system tables that want unique oids already do this. One issue
with making a unique index on oid is that after oid counter rollover
you'll potentially get intermittent constraint violations due to duplicate
oids that you need to be able to handle.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Franco Bruno Borghesi 2004-11-11 18:23:48 Re: Last value inserted
Previous Message Robby Russell 2004-11-11 18:13:33 Re: Last value inserted

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin B. 2004-11-11 19:47:05 version changes
Previous Message Bruno Wolff III 2004-11-11 18:01:30 Re: OID Question