Re: [PATCHES] Interval month, week -> day

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: [PATCHES] Interval month, week -> day
Дата
Msg-id 9C3B1BEF-E5C6-48EE-A311-C967E2B5EA4E@seespotcode.net
обсуждение исходный текст
Ответ на Re: [PATCHES] Interval month, week -> day  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] Interval month, week -> day  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-hackers
On Sep 1, 2006, at 9:32 , Tom Lane wrote:

> Michael Glaesemann <grzm@seespotcode.net> writes:
>> On Sep 1, 2006, at 9:12 , Tom Lane wrote:
>>> 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?
>
>> I'll check on this tonight. Any idea where I might start to look?
>
> I'd look at the input routines for all the datetime types and see
> where
> they go.  It's entirely possible that DecodeInterval is the only place
> with the problem, but I'd not assume that without looking.

AFAICS, DecodeInterval is the only place that needed changing. I've
looked through datetime.c, timestamp.c, date.c, and nabstime.c, and
don't see anything else. It makes sense, too, as the only place where
you could have weeks or non-integer months is during Interval input
or interval multiplication/division. The pg_tm struct, which is used
in time(stamp)?(tz)?/interval arithmetic only has integral months and
no weeks component, so that shouldn't cause any problems. So, I think
that's about it.

Michael Glaesemann
grzm seespotcode net




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

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Optimizing prepared statements
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Optimizing prepared statements