[Django] #33707: Allow Oracle table names to be over 30 characters

73 views
Skip to first unread message

Django

unread,
May 13, 2022, 10:00:32 AM5/13/22
to django-...@googlegroups.com
#33707: Allow Oracle table names to be over 30 characters
-------------------------------------+-------------------------------------
Reporter: Scott | Owner: nobody
Ertel |
Type: New | Status: new
feature |
Component: Database | Version: 4.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently django.db.backends.oracle sets the max length of a table to 30
characters, and models with names longer than that are hashed. This makes
it difficult for users of the database (i.e. analytics users) to work
with the tables in their queries.

Oracle has allowed characters over 30 length since 12.2, and Django
supports versions 19c and higher.

I change this behavior through a monkey patch:

{{{
DatabaseOperations.max_name_length = lambda x: 128
}}}

I was wondering if the length could be specified in the config and the
max_name_length function could be changed to use that setting, or default
to 30 if not set?

I would like to contribute the change if possible.

--
Ticket URL: <https://code.djangoproject.com/ticket/33707>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 13, 2022, 1:56:41 PM5/13/22
to django-...@googlegroups.com
#33707: Allow Oracle table names to be over 30 characters
-------------------------------------+-------------------------------------
Reporter: Scott Ertel | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #30684.

--
Ticket URL: <https://code.djangoproject.com/ticket/33707#comment:1>

Reply all
Reply to author
Forward
0 new messages