#23680: DecimalField and Postgres ORM produces incorrect SQL on filter 
comparison
-------------------------------------+-------------------------------------
     Reporter:  bufke                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.6
  (models, ORM)                      |               Resolution:  invalid
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by shaib):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 {{{#!python
 >>> from decimal import Decimal as D
 >>> D(59.99)
 Decimal('59.99000000000000198951966012828052043914794921875')
 >>> D('59.99')
 Decimal('59.99')
 >>>
 }}}

 I don't think there's anything wrong with the ORM here. Your problem is
 that 59.99 cannot be represented as a float. Feel free to reopen if you
 have a justification.

--
Ticket URL: <https://code.djangoproject.com/ticket/23680#comment:1>
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/063.c77a5ea75eb81172c67246b24641dd38%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to