Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f760WR659052 for ; Sun, 5 Aug 2001 20:32:27 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f760VfY07599; Sun, 5 Aug 2001 20:31:41 -0400 (EDT) To: Peter Eisentraut cc: Allan Engelhardt , Josh Berkus , pgsql-sql@postgresql.org Subject: Re: Re: Data type confusion In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Mon, 06 Aug 2001 02:00:03 +0200" Date: Sun, 05 Aug 2001 20:31:41 -0400 Message-ID: <7596.997057901@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200108/56 X-Sequence-Number: 4277 Peter Eisentraut writes: > One day we will have to accept the fact that months and seconds must not > be mixed, period. You can have year/month intervals or > day/hour/minute/second intervals, not a combination. An interval of '5 > years 3 minutes' has no meaning with the natural calendar rules. I don't agree --- five years and three minutes is perfectly meaningful. There are only certain things you can validly do with it, however, and scaling by a floating-point number isn't one of them, because fractional months aren't well-defined. But you can, for example, add it to or subtract it from a timestamp to produce a well-defined result timestamp. The real bogosity in the interval type is that months and seconds are not sufficient: it should be months, days, and seconds. As we get reminded twice a year by the regression tests, "1 day" and "24 hours" are not the same thing. regards, tom lane