Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 22B109FB351 for ; Thu, 5 Oct 2006 15:37:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 57882-03 for ; Thu, 5 Oct 2006 18:37:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 721C99FB345 for ; Thu, 5 Oct 2006 15:37:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k95IbPir029753; Thu, 5 Oct 2006 14:37:25 -0400 (EDT) To: Martin Marques cc: pgsql-sql@postgresql.org Subject: Re: age() vs. timestamp substraction In-reply-to: References: Comments: In-reply-to Martin Marques message dated "Thu, 05 Oct 2006 15:27:46 -0300" Date: Thu, 05 Oct 2006 14:37:24 -0400 Message-ID: <29752.1160073444@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/63 X-Sequence-Number: 26452 Martin Marques writes: > I just found this problem with the age() function, which AFAIK should > give the same resulte as a subtraction of the argument from now(), Where did you get that idea? age's reference point is current_date (ie, midnight) not now(). There are also some differences in the calculation compared to a plain timestamp subtraction. regards, tom lane