Re: BUG #1993: Adding/subtracting negative time intervals

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1993: Adding/subtracting negative time intervals
Дата
Msg-id 9337.1130213038@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #1993: Adding/subtracting negative time intervals  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: BUG #1993: Adding/subtracting negative time intervals  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
Michael Fuhr <mike@fuhr.org> writes:
> Should 24 hours be the same as 1 * 24 hours?

Yes, I would think so.

> The latter appears to be equal to 1 day, not 24 hours:

Urgh.  I think this is a serious thinko in Michael Glaesemann's rewrite
of interval_mul.  The application of interval_justify_hours is utterly
wrong ... and in fact, I'm not sure it should be applied in any of the
three functions that currently call it.  I don't mind the user deciding
he'd like to flatten '24 hours' to '1 day' but the basic arithmetic
functions for intervals have no business doing that.

Comments?

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: BUG #1993: Adding/subtracting negative time intervals
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1993: Adding/subtracting negative time intervals