On Thu, Nov 11, 2004 at 03:34:14PM -0500, Geoffrey wrote: > So this prompts a question regarding the documentation. I'm assuming > that I can address the wrap-around issue based on the following found > under "Notes" section of the "Create Table" document: > > "Whenever an application makes use of OIDs to identify specific rows of > a table, it is recommended to create a unique constraint on the oid > column of that table, to ensure that OIDs in the table will indeed > uniquely identify rows even after counter wraparound." > > Am I reading this correctly? If I place a unique constraint on the oid > column, I will not have to worry about oid wrap around?
Nope, it means that OIDs are not inherintly unique and you need to make an index to force them to be unique. The OID counter will still wraparound but now if the OID is reused your INSERT will just fail instead of inserting a duplicate. Seriously, use a SERIAL, OIDs are nowhere near as interesting as people keep suggesting... -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
pgpWKQVE9ivkq.pgp
Description: PGP signature