Better handling of database version-specific feature initialisation
|Reported by:||mtredinnick||Owned by:||Xof|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Right now, we have problems such as those mentioned in #10467 (comment 4). If a part of Django wants to use a particular feature that depends on the database version, it needs to first have talked to the database. This breaks in some edge-cases.
Some alternative possibilities are
- understanding deferred-features, but that looks hard. For example, it's difficult to imagine how "return ID from insert" can work in that fashion without being really ugly code.
- requiring the settings file to include the version information so we don't have to make the wasteful SELECT version(); (or equivalent) call for every database connection. It's essentially unchanging information.
Anyway, that's a discussion for later (I'll start a thread on django-dev at some point). Opening the ticket to remind me to look at this.
Change History (9)
comment:2 Changed 7 years ago by Alex
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 7 years ago by Xof
- Owner changed from nobody to Xof
- Status changed from new to assigned