Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

pgsql-novice by date

Next:From: Stephan SzaboDate: 2004-11-11 18:15:36
Subject: Re: OID Question
Previous:From: Uwe C. SchroederDate: 2004-11-11 17:58:08
Subject: Re: OID Question

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group