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 Erin Kelly, 15 years ago

Cc: Erin Kelly Matt Boersma added

comment:2 by Erin Kelly, 15 years ago

Resolution: wontfix
Status: newclosed

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.

comment:3 by steveed, 15 years ago

Resolution: wontfix
Status: closedreopened

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 Jacob, 15 years ago

Resolution: wontfix
Status: reopenedclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top