#33647: bulk_update silently truncating values for size limited fields
-------------------------------------+-------------------------------------
     Reporter:  jerch                |                    Owner:  Akash
                                     |  Kumar Sen
         Type:  Bug                  |                   Status:  assigned
    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
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * has_patch:  1 => 0


Comment:

 Replying to [comment:23 Akash Kumar Sen]:
 > I have checked your GitHub comment. Any suggestions you have in mind?
 > Initially I went for updating the compiler itself, but that seems to be
 a much more tedious task. I have one more hacky Idea like this which is as
 follows:
 > - Introduce a new database function named {{{CastSuperType}}} that will
 always cast the super type for every possible arguments.
 > - Like varchar for varchar(20) and similar equivalents for all the other
 fields that supports casting.
 >
 > - I also thought of having a different {{{SQLUpdateCompiler}}} compiler
 for PostgreSQL, but as the UpdateQuery(https://github.com/Akash-Kumar-
 Sen/django/blob/bulk_update/django/db/models/sql/subqueries.py#L48) code
 is shared between the databases I am finding a hard time to do that.

 This is a tricky issue to solve, and we cannot move forward with a stub
 solution just for this reason. I suspect that we will need to revisit
 `bulk_update()` to make it work properly, but I don't have any specific
 advice.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33647#comment:24>
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/0107018b36827ac3-26cd9462-d491-4e64-b6ef-80c0c23d0015-000000%40eu-central-1.amazonses.com.

Reply via email to