#27632: Oracle backend fails to execute a query with an aggregation that 
contains
an expression in the GROUP BY.
-------------------------------------+-------------------------------------
     Reporter:  Josh Smeaton         |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  oracle               |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Shai Berger):

 Replying to [comment:4 Josh Smeaton]:
 > Thinking about this more, this isn't always going to be correct. What if
 you want to GROUP BY the substring of a column? We'd be changing results.

 Yes. I have made a similar
 [https://github.com/django/django/pull/6267#issuecomment-229190145 note]
 on the PR that begat this issue, regarding GROUP BY a sum of columns.

 The Django ORM supports user-named arguments on most backends, but never
 uses named arguments itself. The `:arg0`, `:arg1` etc. are just the Oracle
 implementation of a query that is, at a higher level, phrased with `%s`,
 `%s`. While going down the levels, we lose the information that two formal
 arguments in the SQL actually refer to the same argument in the user code.
 This is the real problem we need to solve, and I seriously doubt it can be
 achieved in the 1.11 time-frame.

--
Ticket URL: <https://code.djangoproject.com/ticket/27632#comment:5>
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/066.1579ceb50b5d081647e6dfa23145a683%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to