Re: [PATCHES] Interval month, week -> day - Mailing list pgsql-hackers

From Michael Glaesemann
Subject Re: [PATCHES] Interval month, week -> day
Date
Msg-id 9C3B1BEF-E5C6-48EE-A311-C967E2B5EA4E@seespotcode.net
Whole thread Raw
In response to Re: [PATCHES] Interval month, week -> day  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Interval month, week -> day  (Michael Glaesemann <grzm@seespotcode.net>)
List 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 by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Optimizing prepared statements
Next
From: Gregory Stark
Date:
Subject: Re: Optimizing prepared statements