Opened 15 years ago
Closed 15 years ago
#11898 closed (wontfix)
oracle quote_name bug
Reported by: | steveed | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.1 |
Severity: | Keywords: | oracle, quote_name | |
Cc: | Erin Kelly, Matt Boersma | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the below snippet of code from db/backends/oracle/base.py it appears that regardless of the how the name is sent in it is returned in uppercase. If believe line 155 should be 'return name'
Thanks,
Stephen
147 def quote_name(self, name): 148 # SQL92 requires delimited (quoted) names to be case-sensitive. When 149 # not quoted, Oracle has case-insensitive behavior for identifiers, but 150 # always defaults to uppercase. 151 # We simplify things by making Oracle identifiers always uppercase. 152 if not name.startswith('"') and not name.endswith('"'): 153 name = '"%s"' % util.truncate_name(name.upper(), 154 self.max_name_length()) 155 return name.upper()
Change History (4)
comment:1 by , 15 years ago
Cc: | added |
---|
comment:2 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
I am not sure why it is a won't fix. As is it doesn't work with how oracle tables are named. Oracle tables can be upper case or mixed case, and currently django states the sql requirement and then ignores it. I think this is a bug it should not return name upper unless the name is not quoted.
comment:4 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Please don't reopen tickets marked wontfix; take it up on django-developers.
If you do, please be sure to explain why this wouldn't be backwards-incompatible.
This would be a very backward-incompatible change, breaking any model or field that has lowercase letters in its name. I don't see it happening without a very compelling reason.