Mea Culpa on Those Surrogate Keys

Josh Berkus gripes about a common problem in todays software… abuse and misunderstanding of [ surrogate keys]. Given that I used a bunch of them in the [ php/pg book], I better provide [ a pointer to his article]. In my defense I did protest a little bit, but for example code it tends to make things easier to mess around with, so I didn’t really try to fight it. What is interesting is that in [ PostgreSQL], the [ OID] was really more of a true surrogate key than the [ serial datatype], which has become more popular and powerful as PostgreSQL has started being used by more industry types rather than [ academics] (for lack of a better word). But I guess that’s all water under the bridge now… what you can do though is go read his post and then at least add additional [ unique constraints] to your tables for the columns that really do define a unique row.