X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F22AD9DC817 for ; Sat, 18 Feb 2006 09:50:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59486-05 for ; Sat, 18 Feb 2006 09:50:31 -0400 (AST) X-Greylist: delayed 00:06:39.539691 by SQLgrey- Received: from mail.cores.co.yu (cores-2.yubc.net [213.184.101.2]) by postgresql.org (Postfix) with SMTP id 0F52F9DCAE2 for ; Sat, 18 Feb 2006 09:50:24 -0400 (AST) Received: (qmail 4140 invoked by uid 1013); 18 Feb 2006 13:53:23 -0000 Received: from milorad.poluga@cores.co.yu by mail by uid 1010 with qmail-scanner-1.22-st-qms (clamdscan: 0.74. spamassassin: 2.63. Clear:RC:1(10.0.1.253):. Processed in 0.024253 secs); 18 Feb 2006 13:53:23 -0000 X-Antivirus-CORESINC-Mail-From: milorad.poluga@cores.co.yu via mail X-Antivirus-CORESINC: 1.22-st-qms (Clear:RC:1(10.0.1.253):. Processed in 0.024253 secs Process 4132) Received: from unknown (HELO poluga.linsoft.co.yu) (10.0.1.253) by mail.cores.co.yu with SMTP; 18 Feb 2006 13:53:23 -0000 From: Milorad Poluga Organization: CORES To: pgsql-sql@postgresql.org Subject: Interval subtracting Date: Sat, 18 Feb 2006 14:44:05 +0100 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200602181444.06009.milorad.poluga@cores.co.yu> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200602/234 X-Sequence-Number: 24244 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) / Thanks a lot, Milorad Poluga ------------------------------- milorad.poluga@cores.co.yu