News for hackers. Stuff that matters.
Re:Obfuscate Your Company by dpifke on Friday May 29, 2009 @07:01PM (#633012)
Using database OIDs as publicly accessible identifiers is a neat idea, one I haven't tried.

Looking at the Postgres docs (http://www.postgresql.org/docs/8.0/static/datatype-oid.html) they discourage the use of OIDs, going so far as to say the default in future versions is not to create OIDs for user-created tables.

Also, this would mean that a dump/restore of your database results in invalidating all your identifiers.

What RDBMS do you do this on and have you run into any problems?

EDIT: Sure enough, in modern Postgres, these are disabled by default. Additionally, they appear to be sequentially assigned:

dev01=> select *,oid from test; test_id | test_string | oid ---------+-----------------+------- 1 | blah | 29837 2 | blahblahblah | 29838 3 | xxxblahblahblah | 29839

Re:Obfuscate Your Company by edw519 on Friday May 29, 2009 @07:17PM (#633031)
I implement double IDs in my own code, not in any built-in function of any DBMS. You're right to be suspicious.