#32653: Quoting names in the Oracle backend is not consistent with the db_table
generation.
-------------------------------------+-------------------------------------
Reporter: Javier Buzzi | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* keywords: => oracle
* stage: Unreviewed => Accepted
Comment:
I agree with Shai's [https://groups.google.com/g/django-
developers/c/f3Z0AchkdyU/m/p7D4c78QCgAJ comment]. It's related with
quoting names in the Oracle backend and can be fixed by:
{{{
diff --git a/django/db/backends/oracle/operations.py
b/django/db/backends/oracle/operations.py
index ae6bd432fb..d48c8dd868 100644
--- a/django/db/backends/oracle/operations.py
+++ b/django/db/backends/oracle/operations.py
@@ -334,7 +334,7 @@ END;
# always defaults to uppercase.
# We simplify things by making Oracle identifiers always
uppercase.
if not name.startswith('"') and not name.endswith('"'):
- name = '"%s"' % truncate_name(name.upper(),
self.max_name_length())
+ name = '"%s"' % truncate_name(name, self.max_name_length())
# Oracle puts the query text into a (query % args) construct, so
% signs
# in names need to be escaped. The '%%' will be collapsed back to
'%' at
# that stage so we aren't really making the name longer here.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32653#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.87829c0dcaa930c6c039203c3a75f4de%40djangoproject.com.