From: | Richard Huxton <dev(at)archonet(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 17:50:00 |
Message-ID: | 4193A648.8070501@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
Terry Lee Tucker 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
> 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?
Just create a "recid" field of type SERIAL and add a unique constraint.
You can create tables WITHOUT OIDS if you want to reclaim some space in
the process.
OIDs will wrap around and are only guaranteed to be unique in
system-tables IIRC.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2004-11-11 17:51:26 | Re: Important Info on comp.databases.postgresql.general |
Previous Message | Gary L. Burnore | 2004-11-11 17:33:57 | Re: Important Info on |
From | Date | Subject | |
---|---|---|---|
Next Message | Uwe C. Schroeder | 2004-11-11 17:58:08 | Re: OID Question |
Previous Message | Terry Lee Tucker | 2004-11-11 15:04:30 | OID Question |