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. ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend