Re: Interval subtracting

From: "Milen A(dot) Radev" <milen(at)radev(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Interval subtracting
Date: 2006-02-18 14:24:39
Message-ID: 43F72E27.2060408@radev.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-sql

Milorad Poluga написа:
> Hi all,
>
> Is there something incorrect in the above query ?
> SELECT '10 years 1 mons 1 days'::interval - '9 years 10 mons 15 days'::interval
>
> ?column?
> ---------------
> 3 mons -14 days
>
> Why not '2 mons 16 days' ?
>
> /version = PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) /

How many days are there in a month?

--
Milen A. Radev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2006-02-18 14:28:58 Re: Updated email signature
Previous Message Milorad Poluga 2006-02-18 13:44:05 Interval subtracting

Browse pgsql-patches by date

  From Date Subject
Next Message Milorad Poluga 2006-02-18 14:36:20 Re: Interval subtracting
Previous Message Milorad Poluga 2006-02-18 13:44:05 Interval subtracting

Browse pgsql-sql by date

  From Date Subject
Next Message Milorad Poluga 2006-02-18 14:36:20 Re: Interval subtracting
Previous Message Milorad Poluga 2006-02-18 13:44:05 Interval subtracting