Re: BUG #1993: Adding/subtracting negative time intervals - Mailing list pgsql-bugs

From Andrew - Supernews
Subject Re: BUG #1993: Adding/subtracting negative time intervals
Date
Msg-id slrndlu9lo.g61.andrew+nonews@trinity.supernews.net
Whole thread Raw
In response to Re: BUG #1993: Adding/subtracting negative time intervals  (Klint Gore <kg@kgb.une.edu.au>)
List pgsql-bugs
On 2005-10-26, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Klint Gore <kg@kgb.une.edu.au> writes:
>> On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
>> <pgman@candle.pha.pa.us> wrote:
>>> test=> select
>>> test-> ('2005-10-30 13:22:00-05'::timestamptz -
>>> test(>  '2005-10-29 13:22:00-04'::timestamptz);
>>> ?column?
>>> ----------
>>> 25:00:00
>>> (1 row)
>
>> Is that actually the correct answer?
>
> I'm of the opinion that the correct answer, or at least the usually
> desired answer, is "1 day".

Timestamp subtraction is not age(). Subtraction should be precise, age()
is allowed to justify.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Next
From: Andrew - Supernews
Date:
Subject: Re: BUG #1993: Adding/subtracting negative time intervals