pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Milen A. Radev <milen@radev.net>
To: pgsql-sql@postgresql.org
Subject: Re: Interval subtracting
Date: Sat, 18 Feb 2006 16:24:39 +0200
Message-ID: <43F72E27.2060408@radev.net> (raw)
In-Reply-To: <200602181444.06009.milorad.poluga@cores.co.yu>
References: <200602181444.06009.milorad.poluga@cores.co.yu>

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




view thread (62+ messages)  latest in thread

Message-ID: <43F72E27.2060408@radev.net>
Permalink:  ../43F72E27.2060408@radev.net/
Also on:    postgresql.org/message-id/43F72E27.2060408@radev.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: milen@radev.net
  Subject: Re: Interval subtracting
  In-Reply-To: <43F72E27.2060408@radev.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox