On 5/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:

> I'm going to work on that problem (putting in decimal support) this week
> sometime. Maybe today or tomorrow. It's starting to annoy me, seeing all
> the decimal-reated tickets in Trac, so after I knock off all the email
> ones (today), I want to fix up the decimal problem, in between other
> things.

Just to be clear MySQL has separate FLOAT and DECIMAL/NUMERIC column
types; the latter are fixed-point fields which correspond to Python's
Decimal type. So it is unfortunate that the Django mysql backend is
using a NUMERIC column for FloatField. Perhaps Django needs a
DecimalField (or NumericField) for fixed-point values? (You might be
working on this; haven't searched bugs.)

There's also a DOUBLE column type in MySQL for double-precision, which
may be a better fit for Python's float (which is a C double) and
Django's FloatField. MySQLdb returns FLOAT and DOUBLE columns as
Python floats so it's a matter of how much storage/precision you want.

http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
-- 
Patriotism means to stand by the country. It does
not mean to stand by the president. -- T. Roosevelt

This message has been scanned for memes and
dangerous content by MindScanner, and is
believed to be unclean.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to