Re: [SQL] Interval subtracting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Interval subtracting
Дата
Msg-id 15320.1141247469@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Interval subtracting  (Mark Dilger <pgsql@markdilger.com>)
Ответы Re: [SQL] Interval subtracting  (Mark Dilger <pgsql@markdilger.com>)
Список pgsql-hackers
Mark Dilger <pgsql@markdilger.com> writes:
> The current code (without the patch) behaves as follows:

>    select justify_days(justify_hours('1 month 95 days -36:00:00'::interval));
>          justify_days
>    -------------------------
>     4 mons 4 days -12:00:00

So?  If we liked the current behavior we wouldn't be discussing a patch...

My thought is that justify_hours should reduce that input to
'1 month 93 days 12:00:00' and then justify_days would produce
'4 months 3 days 12:00:00'.
        regards, tom lane


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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: [SQL] Interval subtracting
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: [SQL] Interval subtracting