Andres Freund <and...@anarazel.de> writes: > What about an interval / interval -> double operator that errors out whenever > month is non-zero? As far as I can tell that would always be deterministic.
We have months, days, and microseconds, and microseconds-per-day isn't much more stable than days-per-month (because DST). By the time you restrict this to give deterministic results, I think it won't be particularly useful. You could arbitrarily define months as 30 days and days as 24 hours, which is what some other interval functions do, and then the double result would be well-defined; but how useful is it really? regards, tom lane