From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Allan Engelhardt <allane(at)cybaea(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Re: Data type confusion |
Date: | 2001-08-06 00:31:41 |
Message-ID: | 7596.997057901@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Peter Eisentraut <peter_e(at)gmx(dot)net> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-08-06 01:33:24 | Re: Re: Data type confusion |
Previous Message | Peter Eisentraut | 2001-08-06 00:00:03 | Re: Re: Data type confusion |