Re: OID Question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
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:01:30
Message-ID: 20041111180130.GC25936@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Thu, Nov 11, 2004 at 10:04:30 -0500,
Terry Lee Tucker <terry(at)esc1(dot)com> wrote:
> Greetings,
>
> Here is a simple question:
>
> Is it ok to put a unique index on the oid for my tables? We are in the process

Yes, but you may occasionally have insert failures if the oid wraps around
and you try to reuse one on an insert.

> 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

You should probably just use a normal column named recid and not try to
use the special oid column to do this.

> 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Uwe C. Schroeder 2004-11-11 18:03:19 Re: Last value inserted
Previous Message Uwe C. Schroeder 2004-11-11 17:58:08 Re: OID Question

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2004-11-11 18:15:36 Re: OID Question
Previous Message Uwe C. Schroeder 2004-11-11 17:58:08 Re: OID Question