Skip site navigation (1) Skip section navigation (2)

Re: BUG #1993: Adding/subtracting negative time intervals

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>,Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>, Russell Smith <mr-russ(at)pws(dot)com(dot)au>,pgsql-bugs(at)postgresql(dot)org, Nicholas <hb(at)x256(dot)com>
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Date: 2005-10-25 04:03:58
Message-ID: 9337.1130213038@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> Should 24 hours be the same as 1 * 24 hours?

Yes, I would think so.

> The latter appears to be equal to 1 day, not 24 hours:

Urgh.  I think this is a serious thinko in Michael Glaesemann's rewrite
of interval_mul.  The application of interval_justify_hours is utterly
wrong ... and in fact, I'm not sure it should be applied in any of the
three functions that currently call it.  I don't mind the user deciding
he'd like to flatten '24 hours' to '1 day' but the basic arithmetic
functions for intervals have no business doing that.

Comments?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Qingqing ZhouDate: 2005-10-25 04:06:22
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Previous:From: Andrew DunstanDate: 2005-10-25 04:01:26
Subject: Re: [GENERAL] 'a' == 'a '

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2005-10-25 04:23:51
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Previous:From: Michael FuhrDate: 2005-10-25 03:45:17
Subject: Re: BUG #1993: Adding/subtracting negative time intervals

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group