#23557: annotate gives different results on postgresql and mysql
-------------------------------------+-------------------------------------
     Reporter:  brian                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by brian):

 My personal opinion is that Django should never alter silently alter
 queries. If there is something wrong with the query, it should generate an
 error rather then attempt to fix the problem by altering the query. The
 fact the current Postgresql behaviour is documented doesn't make it any
 more correct IMHO. The programmer should be forced to explicitly state the
 preferred solution rather then Django guess it.

 I would suggest that Django has some sort of legacy mode, enabled by
 default, for preserving the current behaviour, and a new mode where errors
 such as these trigger an error condition. That way any problems can be
 identified and fixed, rather then silently await some change (e.g.
 different database, or somebody deciding to add an ordering field where
 there was none), and nobody noticing that the results generated are now
 wrong.

--
Ticket URL: <https://code.djangoproject.com/ticket/23557#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.812cfaaee6da025e5c6e27db08e88a90%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to