#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:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by 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 I am finding a hard time to do that.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33647#comment:23>
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/0107018b343ab959-166f181c-f2a7-48f7-b851-9bebebffeeed-000000%40eu-central-1.amazonses.com.

Reply via email to