Re: Interval month, week -> day

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Interval month, week -> day
Date: 2006-09-03 11:00:30
Message-ID: 9C3B1BEF-E5C6-48EE-A311-C967E2B5EA4E@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


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

> Michael Glaesemann <grzm(at)seespotcode(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2006-09-03 11:41:37 Re: Optimizing prepared statements
Previous Message Jeroen T. Vermeulen 2006-09-03 10:04:09 Optimizing prepared statements

Browse pgsql-patches by date

  From Date Subject
Next Message Pavel Stehule 2006-09-03 11:02:30 Re: plpgsql, return can contains any expression
Previous Message Tom Lane 2006-09-03 04:49:41 Re: [HACKERS] [COMMITTERS] pgsql: Change FETCH/MOVE to use int8.