Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Friday July 24, 2009
04:29 AM

SQL Keywords Are Not Good Column Names

[ #39341 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I once had to deal with a table named "group" (though I didn't name it). The database had been around far too long to think about changing it.
  • I too feel your pain. It is quite natural in ham radio to abbreviate Callsign (our government issued not-quite* unique ids) as '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) []

    * why 'not quite unique? Two issues --

    1. A call
    # I had a sig when sigs were cool
    use Sig;