Started: 16 September 2008, 16:00 UTC
Finished: 16 September 2008, 16:12 UTC

Non-overlapping ID counters

I think one of the the best minor things I've done while administering the website for the mel8 conference was winding the different ID counters in the database to different starting points. That is, doing a SELECT setval('registration_id_seq', 20000); and similarly for most of the other sequences, with different starting points.

That way, given an ID number, I could tell what kind of ID it is.

From a strict point of view, that's terrible — you're never supposed to have a random ID number floating about which you then try to match against several different tables. In practice, however, it doesn't cost anything and it's quite useful — on a support call you're often glad they have any number...

The stultolarity
   
Recording culture

comment by:
email: (will not be displayed)
6 times 5:


Home
Blog
Random
E-mail
IM


[æ]