#32636: QuerySet.values()/values_list() crashes on a combined queryset ordered 
by
"extra" select.
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  David
                                     |  Wobrock
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  queryset combined    |             Triage Stage:  Accepted
  union difference intersection      |
  extra                              |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by David Wobrock):

 * needs_better_patch:  0 => 1


Comment:

 It would seem that postgres is smarter than others in this case.
 Even with correctly generated SQL, the suggest test method in the ticket
 [https://djangoci.com/job/pull-requests-bionic/database=postgres,label
 =bionic-
 
pr,python=python3.9/11241/testReport/junit/queries.test_qs_combinators/QuerySetSetOperationTests/test_union_multiple_models_with_values_and_order_by_extra_select_different_fields/
 description fails] with:
 {{{
 UNION types integer and character varying cannot be matched
 }}}
 since 'name' and 'greatest_fan_id' do not have a matching type.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32636#comment:3>
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/065.f88d92ea86506ddf778f53e4497a3117%40djangoproject.com.

Reply via email to