Re: Interval month, week -> day

Поиск
Список
Период
Сортировка
Искать
От
Michael Glaesemann
Тема
Re: Interval month, week -> day
Дата
Msg-id
7E7C935A-31B5-405C-9D83-958C95A77647@seespotcode.net
Ответ на
Список
Дерево обсуждения
Interval month, week -> day Michael Glaesemann <grzm@seespotcode.net>
Re: Interval month, week -> day Bruce Momjian <bruce@momjian.us>
Re: Interval month, week -> day Tom Lane <tgl@sss.pgh.pa.us>
Re: Interval month, week -> day Michael Glaesemann <grzm@seespotcode.net>
Re: Interval month, week -> day Tom Lane <tgl@sss.pgh.pa.us>
Re: Interval month, week -> day Michael Glaesemann <grzm@seespotcode.net>
Re: Interval month, week -> day Michael Glaesemann <grzm@seespotcode.net>
Re: Interval month, week -> day Tom Lane <tgl@sss.pgh.pa.us>
Re: Interval month, week -> day Michael Glaesemann <grzm@seespotcode.net>
Re: [HACKERS] Interval month, week -> day Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Interval month, week -> day Bruce Momjian <bruce@momjian.us>
Re: [HACKERS] Interval month, week -> day Michael Meskes <meskes@postgresql.org>
Re: [HACKERS] Interval month, week -> day Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Interval month, week -> day Bruce Momjian <bruce@momjian.us>
Re: [HACKERS] Interval month, week -> day Andrew Dunstan <andrew@dunslane.net>

On Sep 1, 2006, at 9:12 , Tom Lane wrote:

> Michael Glaesemann  writes:
>> I came across some behavior that seems counterintuitive to me:
>
>> test=# select '1.5 mon'::interval;
>>      interval
>> -----------------
>> 1 mon 360:00:00
>> (1 row)
>
>> With the time/day/month interval struct introduced in 8.1, I'd expect
>> this to return '1 mon 15 days'. The reason is that the DecodeInterval
>> converts fractional months to time directly, rather than cascading
>> first to days.
>
> I agree that this seems like an oversight in the original
> months/days/seconds patch, rather than behavior we want to keep.
> But is DecodeInterval the only place with the problem?  My  
> recollection
> is that there's a certain amount of redundancy in the datetime  
> code ...

I'll check on this tonight. Any idea where I might start to look?

Michael Glaesemann
grzm seespotcode net



В списке pgsql-patches по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
FAQ