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

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

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Date: 2005-10-26 06:48:24
Message-ID: slrndlu9lo.g61.andrew+nonews@trinity.supernews.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On 2005-10-26, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au> writes:
>> On Tue, 25 Oct 2005 23:41:54 -0400 (EDT), Bruce Momjian
>> <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

pgsql-hackers by date

Next:From: Stefan KaltenbrunnerDate: 2005-10-26 07:02:32
Subject: Re: memcpy SEGV on AIX 5.3
Previous:From: Andrew - SupernewsDate: 2005-10-26 06:19:04
Subject: Re: add_missing_from breaks existing views

pgsql-bugs by date

Next:From: Andrew - SupernewsDate: 2005-10-26 07:02:39
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Previous:From: Tom LaneDate: 2005-10-26 05:56:01
Subject: Re: BUG #1993: Adding/subtracting negative time intervals

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