Re: Absolute value of intervals

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Scott Bailey <artacus(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Absolute value of intervals
Date: 2009-10-30 11:45:24
Message-ID: e51f66da0910300445s431c0fa7p861ac1b285a88f3b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/30/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> > Yes, that is a strange case. When you can't tell if an interval is
> > positive or negative, how do you define the absolute value?
>
> That was the point of my '1 day -25 hours' example. Whether you
> consider that positive or negative seems mighty arbitrary.

If I can add it to a timestamp and get a deterministic result,
then we already have decided how to interpret the arbitrariness.

Might as well be consistent then.

--
marko

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-10-30 12:00:16 Re: Absolute value of intervals
Previous Message Sam Mason 2009-10-30 11:25:13 Re: Absolute value of intervals