In retrospect, my accidentally naming a column after an SQL reserved word ("key") was pretty stupid and now I have a fair chunk of code to change.
But I briefly toyed with the idea of keeping a straight face and telling people it was defense-in-depth against SQL injection attacks. It would be fun to see how many people would buy that rationale.
Re:Table names either
Ovid on 2009-07-24T15:52:55
We ran into that problem ourselves. We have a table named "grouping".
'call'
. That was a poor choice for a column name for such things, since user defined procedures in SQL have to be invoked by a call keyword. I had to expand the column name such that it is wider than the longest likely value (except Roman Italic compresses Callsign more than Roman Bold does WB1GOF) http://fd.ema.arrl.org/History.php
* why 'not quite unique? Two issues --
$ham = qr/[WANK][A-Z]? \d [A-Z]{2,3}/xism;
$plane=qr/N \d+ [A-Z]{1,2}/xism;
** this over simlifies several ways. the US has q(AA)..q(AL)
but not A1$spe=qr/[WNK] \d [A-Z]/xism;
to special events, eg W4H is sed in Bosten once a year but is used for other events elsewhen elsewhere, eg Knoxville TN (Fourth of July), Hunterdon Co 4H Fair, and Key Biscayne FL (in 4th call district), so the uniqueness is but for a weekend, not for a decade. And the equivalence range isn't even autoritatively defined online.
Moral of the story is that seemingly unique identifiers that you don't control issuance of are as likely to bite as seemingly good English word column names that turn out to be SQL reserved words.