Comment 2 for bug 337562

Revision history for this message
James Henstridge (jamesh) wrote :

So there are two competing issues here:
 1. table and column names that contain upper case must be quoted to be recognised by PostgreSQL.
 2. table and column names consisting of all lower case can be referenced by unquoted strings containing upper case. I know for a fact that there is code inside Launchpad that uses this fact.

So a simple fix of quoting all table and column names containing upper case would break compatibility for a large project.

One option might be to define a str subclass that always gets compiled to a quoted identifier and use that. This might be a bit fragile though, since it would be necessary to make sure the object doesn't get converted back to a plain string.