#36815: Avoid unnecessary prepare_value calls when inserting db_defaults
-------------------------------------+-------------------------------------
Reporter: Adam Sołtysik | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Sołtysik):
First of all, the condition has the wrong logic in this variant, it should
be without negation. But apart from that, the `field_prepare` function
(and so `prepare_value`) is called on `DatabaseDefault` values also later
in the code, for databases that don't satisfy
`supports_default_keyword_in_bulk_insert` (Oracle), so this approach
probably wouldn't work there.
--
Ticket URL: <https://code.djangoproject.com/ticket/36815#comment:6>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019b3db5fb22-4e6bb282-8697-4f93-ad81-265fb4d213ec-000000%40eu-central-1.amazonses.com.