I'm pretty sure that Django should always generate uppercase SQL commands, though I suppose this might catch the raw case. So thanks!