Re: Re: Data type confusion
От | Tom Lane |
---|---|
Тема | Re: Re: Data type confusion |
Дата | |
Msg-id | 7596.997057901@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Re: Data type confusion (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Re: Data type confusion
|
Список | pgsql-sql |
Peter Eisentraut <peter_e@gmx.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
В списке pgsql-sql по дате отправления: