[Django] #30684: Oracle Database 12.2 allows 128 byte identifiers

3 views
Skip to first unread message

Django

unread,
Aug 6, 2019, 2:37:10 AM8/6/19
to django-...@googlegroups.com
#30684: Oracle Database 12.2 allows 128 byte identifiers
-------------------------------------+-------------------------------------
Reporter: cjbj | Owner: nobody
Type: | Status: new
Uncategorized |
Component: | Version: 2.2
Uncategorized | Keywords: oracle database
Severity: Normal | identifier
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
https://github.com/django/django/blob/b6c4766f53cf00bcf63cc2aa8be977c8589d083e/docs/ref/databases.txt#L889
says that Oracle Database supports only 30 byte identifiers. In Oracle DB
12.2, identifiers can be 128 bytes. It may not be wise to assume all
12.2+ databases have set their compatibility to 12.2, but perhaps some
handy, backwardly compatible use of the longer size can be implemented?

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

Django

unread,
Aug 6, 2019, 5:40:34 AM8/6/19
to django-...@googlegroups.com
#30684: Oracle Database 12.2 allows 128 byte identifiers
-------------------------------------+-------------------------------------
Reporter: cjbj | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: oracle database | Triage Stage:
identifier | Unreviewed
Has patch: 0 | Needs documentation: 0

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

* status: new => closed
* resolution: => wontfix
* version: 2.2 => master
* component: Uncategorized => Database layer (models, ORM)
* type: Uncategorized => Cleanup/optimization


Comment:

The 30 limit has been in play literally forever (since
ac64e91a0cadc57f4bc5cd5d66955832320ca7a1). These days, Oracle 12.2 is our
minimum supported version, so it seems reasonable that we might be able to
do something here. I'd provisionally accept on that basis.

**However**: I haven't thought about the migration path.
`truncate_name()`, with `max_name_length()` is used to generate
identifiers in a number of places. I'm not sure how feasible it would be
to just change that (for users with existing databases). Maybe we can do
something clever at runtime?
Not sure if it's feasible and/or worth the effort?

#11898, about `quote_name()` was closed as `wontfix` because of concerns
about a breaking changes of just this sort.

Short of a concrete proposal I'm not sure we can move forward.

#25428 notes that you can easily use a backend subclass to override
`max_name_length()` in your own project. That may just be the best
solution (if the migration path is a pain...)

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

Reply all
Reply to author
Forward
0 new messages