Code

Opened 5 years ago

Closed 4 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: ikelly, mboersma Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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()

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by ikelly

  • Cc ikelly, mboersma added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by ikelly

  • Resolution set to wontfix
  • Status changed from new to closed

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 Changed 4 years ago by steveed

  • Resolution wontfix deleted
  • Status changed from closed to 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 Changed 4 years ago by jacob

  • Resolution set to wontfix
  • Status changed from reopened to 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.