#24254: Passing a query to "pk__in" of another query may result in invalid SQL
-------------------------------------+-------------------------------------
     Reporter:  bronger              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (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 inglesp):

 The proposed patch passes on SQLite, but fails on Postgres, with:

 {{{
 for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE
 1: ...eries_person"."id" FROM "queries_person" ORDER BY "queries_p...
 }}}

 and on MySQL, with:

 {{{
 This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME
 subquery'
 }}}

 I'm afraid I don't know enough about either database to know what the
 right fix is.

--
Ticket URL: <https://code.djangoproject.com/ticket/24254#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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ec40a3244dc28669f6737d0b943572a9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to