Re: [SQL] Interval subtracting

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: [SQL] Interval subtracting
Дата
Msg-id 4406331A.6080307@markdilger.com
обсуждение исходный текст
Ответ на Re: [SQL] Interval subtracting  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [SQL] Interval subtracting  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> Even if we had people do:
> 
>     justify_hours(justify_days(justify_hours()))
> 
> I don't think that would do what we want in all cases.  Consider '1 mon
> -1 hour'.  That should be '29 days 23 hours' but neither existing
> function, even if modified, will allow us to return that.  Only
> something like justify_interval() could do it.
> 

justify_days(justify_hours(...)) fixes *everything* in the most recently 
submitted patch, regardless of the convoluted case you invent.  There is no data 
for which it won't work.  There is no need for justify_interval(...), except as 
syntactic sugar.

Since the backward compatibility argument didn't convince you, then we should go 
with the existing patch as-is.  Whether we introduce the new function 
justify_interval(...) could be treated as a separate question, though I don't 
mind putting that in the patch and resubmitting.

mark


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

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