Michael Glaesemann <[EMAIL PROTECTED]> writes: > On Jun 1, 2005, at 1:42 PM, Michael Glaesemann wrote: >> -- v8.0.3 >> test=# select '25 hours'::interval; >> interval >> ---------------- >> 1 day 01:00:00 >> (1 row) >> >> -- new interval code >> test=# select '25 hours'::interval; >> interval >> ---------- >> 25:00:00 >> (1 row) >> >> I'll be digging into the spec later and post what I find. Thoughts?
> I've dug a bit, and this is definitely not spec compliant, as > interval hours must be in the range 0-23. Doesn't bother me. The spec says what results you must get from spec-compliant input; I don't think it says we may take only spec-compliant input. (If we were to read it that way, we'd have to rip out every PG extension, not only the interval-related ones.) The entire *point* of this change is to be able to distinguish "25 hours" from "1 day 1 hour", so you can hardly argue that being able to do that is not what we want it to do... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend