On 27/04/11 08:44, Conrad Calmez wrote: > Dear Community, > > two weeks ago I started fixing the ticket #4287. It appears that > infinity values can not be stored to FloatFields using MySQL (that is > what I reproduced). I found out that MySQL can not handle infinity > values. My Fix uses the minimal and maximal float values > (-2147483648 / 2147483647) as -inf/inf. > My questions is if that way of fixing this bug is acceptable. If so I > will also try to reproduce/fix this bug for other db backends.
The problem I anticipate is what happens when you try to do any maths or logic with this value. For example, with Postgres, Infinity does work, and obeys the IEEE 754 spec. So, at the point where a developer runs some non trivial queries against the table containing these pseudo-infinity values, the illusion of portability we have created will break down. So, I for one would not be in favour of this fix. It's not helpful for Django to attempt to hide lack of support for something in the underlying database unless we can do so perfectly. If you need to store infinity in a database column, it's better to know sooner that your database doesn't support it so you can find one that does. Regards, Luke -- "I was sad because I had no shoes, until I met a man who had no feet. So I said, "Got any shoes you're not using?" (Steven Wright) Luke Plant || http://lukeplant.me.uk/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
