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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to