Re: [SQL] Interval subtracting

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Milen A(dot) Radev" <milen(at)radev(dot)net>, pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [SQL] Interval subtracting
Date: 2006-03-08 12:07:27
Message-ID: 440EC8FF.9080201@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-sql

Hi, Scott,

Scott Marlowe wrote:

>>But it isn't '-2 months, -1 day'. I think what you are saying is what I
>>am saying, that we should make the signs consistent.
> Pretty much. It just seems wrong to have different signs in what is
> essentially a single unit.
>
> We don't say 42 degrees, -12 minutes when measuring arc, do we? Then
> again, maybe some folks do. It just seems wrong to me.

But we say "quarter to twelve", at least in some areas on this planet.

The problem is that months have different lengths. '2 months - 1 day'
can be '1 month 27 days', '1 month 28 days', '1 month 29 days' or '1
month 30 days', depending on the timestamp we apply the interval.

Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2006-03-08 12:53:44 Re: [PATCHES] Inherited Constraints
Previous Message Alvaro Herrera 2006-03-08 12:06:09 Re: current segfault if autovauum is on

Browse pgsql-patches by date

  From Date Subject
Next Message Hannu Krosing 2006-03-08 12:53:44 Re: [PATCHES] Inherited Constraints
Previous Message Neil Conway 2006-03-08 08:02:02 Re: CREATE SYNONYM ...

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2006-03-08 15:47:47 Re: [SQL] Interval subtracting
Previous Message Tom Lane 2006-03-07 02:39:18 Re: problem with overloading the "coalesce" function