#33647: bulk_update silently truncating values for size limited fields
-------------------------------------+-------------------------------------
Reporter: jerch | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
An alternative approach might to commit to dropping the whole
`CASE`/`WHEN` wrapping altogether on backends that support it as described
in #29771.
We know the underlying expression construction approach performs poorly
#31202 and the following form doesn't suffer for the type inference issue
we're experiencing here
{{{#!sql
UPDATE test_model SET name = v.name
FROM (VALUES
(1, ‘aaaaaaaaaa’),
(2, ‘bbbbbbbbbb’)
) AS v(id, name)
WHERE test_model.id = v.id
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33647#comment:4>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/01070180400528d2-1a2a2e24-2df3-463c-a16f-4ef51ac9de4f-000000%40eu-central-1.amazonses.com.