Brent Dax (brentdax) wrote,
Brent Dax

  • Mood:
  • Music:

Death to reserved words

Knightley has a feature called "groups". This has proven to be a huge liability.

You see, SQL (the language used to talk to databases) has a feature called GROUP BY. I won't bother explaining what it does, but there's basically only one place in SQL where you could possibly use the word "GROUP" (or "group" or "GrOUp", since SQL is case-insensitive) to access that feature.

Naturally, having a feature called "groups", I want to be able to call things in my database "group". Unfortunately, for some insane reason, SQL uses reserved words--meaning that using "GROUP" in any context, even one that clearly has nothing to do with GROUP BY, is verboten. There are quoting mechanisms for getting around this, but they vary from database to database, so the library I'm using doesn't try to support them.

And now it's having trouble renaming a column named 'group' to 'groupid' for some reason...

Tags: hacking, knightley

  • Paging madlori (and anyone who knows her)

    An interesting thing just happened on Facebook chat. Lori Summers [2:29:44] Got my message ? Brent Royal-Gordon [2:33:45] I did. Lori Summers…

  • guest post

    kate is the best better than the rest the best the best haikus about kate: kate's my favourite i want to lick her ballsack it would taste so…

  • Practice

    This December, I will have been practicing programming seriously for ten years. That will mark the tenth anniversary of me starting to learn Perl. I…

  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.