From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Absolute value of intervals |
Date: | 2009-10-30 12:00:16 |
Message-ID: | 20091030120016.GY5407@samason.me.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Oct 30, 2009 at 01:45:24PM +0200, Marko Kreen wrote:
> On 10/30/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > 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.
The point is that it's only in relation to a specific timestamp do the
components of an interval actually receive comparable values. For
example, a day can be a varying number of hours, a month a varying
number of days and a year can also vary in its number of days. Once
you add this to a date then these components get fixed, but without any
specific timestamp to work with these components remain undefined.
I'd argue that it doesn't help to know that we can add it to a timestamp
and get out a deterministic result. It's the fact that we have a
deterministic comparison operator that helps us.
--
Sam http://samason.me.uk/
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2009-10-30 12:14:31 | Re: Absolute value of intervals |
Previous Message | Marko Kreen | 2009-10-30 11:45:24 | Re: Absolute value of intervals |