Re: [SQL] Interval subtracting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Interval subtracting
Дата
Msg-id 14928.1141245328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Interval subtracting  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:
> But unfortunately '2 mons -1 days' <> '1 mons 29 days'
> If I want something to happen 1 day less than two months from dome date,
> then the only way to say that consistently *is* '2 mons -1 days'.

Sure, but if you want to represent that then you don't pass the value
through justify_days().  The entire premise of justify_days() is that
1 month is interchangeable with 30 days and we should try to make the
value "look nice" given that assumption.

I think everyone's independently arrived at the same thought that
justify_days should not produce a result with different signs for month
and day (except for the case with month = 0, per my last message).
        regards, tom lane


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

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