#23797: SQL generated for negated F() expressions is incorrect
-------------------------------------+-------------------------------------
Reporter: mssnlayam | 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 charettes):
@akaariai what about adding another `IS NOT NULL` clause
[https://github.com/django/django/blob/master/django/db/models/sql/query.py#L1255-L1270
here] based on `value` we should end up with `NOT ((length = width) AND
(length IS NULL) AND (width IS NULL))`?
If the query planer use the index when the generated constraint is `NOT
((length = width) AND (length IS NULL))` then it should also be able to
use it in this case.
--
Ticket URL: <https://code.djangoproject.com/ticket/23797#comment:4>
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/067.629c94826b04b622dedc520b00630efd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.