> Hi,
>
> I'm feeling like I'm missing something, and that it must be obvious.
>
> sqlformat uppercases everything in my queries (except strings in
> single quotes). I didn't specify -i or -k options. Case is followed
> when adding lower, upper. I'd like capitalization to stay as is.
You've hit a bug! Thanks for reporting. Fixed in rev037b00400d.
>
> By the way, I see another problem : strings between double quotes
> shouldn't be capitalized (that's the real reason that the first
> problem bothers me).
Strings in double quotes are handled as identifiers in any case. Literal
strings (in SQL) are expected to be between single quotes. Which SQL
dialect are you using?
>
> Great tool, by the way, I just need to solve these two problems for it
> to be perfect for me :)
Thanks! That's good to hears :)
Regards,
Andi
>
>
> Cheers
>
> Marc
>> By the way, I see another problem : strings between double quotes
>> shouldn't be capitalized (that's the real reason that the first
>> problem bothers me).
>
> Strings in double quotes are handled as identifiers in any case. Literal
> strings (in SQL) are expected to be between single quotes. Which SQL
> dialect are you using?
Oracle, PostgreSQL, Firebird at least behave like this.
Double quotes are used at least in these to specify case sensitive
object names (and names with white spaces, or use reserved keywords as
object names).
You're right. I didn't thought of it this way. They are in quotes mainly
to be treated as is, of course. That's indeed another bug.
If you want to track progress please star this issue:
http://code.google.com/p/python-sqlparse/issues/detail?id=21
Thanks for clarifying!
Andi