Re: [SQL] Interval subtracting

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: [SQL] Interval subtracting
Дата
Msg-id 44060814.8030604@markdilger.com
обсуждение исходный текст
Ответ на Re: [SQL] Interval subtracting  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Hannu Krosing wrote:
> 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'.

Correct me if I am wrong, but I thought that justify_days would only be called 
if the user wanted it.  I get the following behavior in psql even after the 
patch is applied:

select '2 mons -1 days'::interval;    interval
---------------- 2 mons -1 days


So there does not seem to be any justification going on without the user's 
permission.  Consequently, if you need '2 mons -1 days', don't call justify_days.

Am I missing something?

mark


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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: [SQL] Interval subtracting
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: pg_config, pg_service.conf, postgresql.conf ....