On Wed, Jan 20, 2010 at 6:31 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > 2010/1/20 Łukasz Rekucki <lreku...@gmail.com>: >> 2010/1/21 Jerome Leclanche <adys...@gmail.com>: >>> Hi Lukasz, thanks for the wrap up >>> >>> Main issue is precision. I personally very, very often work with >>> milliseconds, and I can imagine many use cases where I'd need to work >>> with microseconds. How many of these backends do not at least support >>> millisecond precision? >> >> From my understanding of the docs PostgreSQL can do microseconds >> (6digits), Oracle - nanoseconds (9digits), SQLite3 seems to accept >> miliseconds in string representation "HH:MM:SS.SSS". >> >> And the worst case is MySQL: >> >> """A trailing .uuuuuu microseconds part of TIME values is allowed >> under the same conditions as for other temporal values, as described >> in Section 10.3.1, “The DATETIME, DATE, and TIMESTAMP Types”. This >> includes the property that any microseconds part is discarded from >> values stored into TIME columns.""" >> >> After seeing all this mess, i'm +1 on using BigIntField. Good work. > > In other words, all the same limitations that we already handle for > TimeFields. This looks to me like a green light to just use the > native datatypes. > > I see another big downside to the BigIntField approach: you can't add > TimeFields and IntervalFields at the database level (e.g. with F > expressions). I'm not sure how PostgreSQL or MySQL would handle this > if you tried it, but I know what Oracle would do: it would accept the > SQL as valid, it would interpret the IntervalField value as a decimal > number of /days/, and it would return a completely incorrect result. > > Cheers, > Ian > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-develop...@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > > >
Ian, FWIW there's a ticket with a patch (of unkown quality :P) for support for using timedeltas with F() expressions. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire "The people's good is the highest law." -- Cicero "Code can always be simpler than you think, but never as simple as you want" -- Me
-- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.