On Jan 10, 2008 2:17 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > You'd have to define exactly what that means, which seems a little > tricky for incommensurate intervals. For instance what is the > result of '1 month' / '1 day' ? >
Postgres has already made such definitions, to allow direct interval-interval comparison. 1 month is deemed equal to 30 days, 1 day is deemed equal to 24 hours (although for some reason we ignore the issue of years vs. days). I argued in a long-dead thread that we should disallow these kinds of comparisons altogether, but I didn't manage to generate much enthusiasm. The overall sentiment seemed to be that the slightly bogus results were more useful than no result at all. That being the case, if we're comfortable making these kinds of arbitrary definitions for comparison purposes, it doesn't seem like much of a stretch to allow multiplication and division of intervals using the same rules. Regards, BJ ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate