Opened 5 years ago

Closed 5 years ago

#30684 closed Cleanup/optimization (wontfix)

Oracle Database 12.2 allows 128 byte identifiers

Reported by: Christopher Jones Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: oracle database identifier
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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?

Change History (1)

comment:1 by Carlton Gibson, 5 years ago

Component: UncategorizedDatabase layer (models, ORM)
Resolution: wontfix
Status: newclosed
Type: UncategorizedCleanup/optimization
Version: 2.2master

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

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