Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 543169FA5E9 for ; Thu, 5 Oct 2006 15:43:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 65818-09 for ; Thu, 5 Oct 2006 15:43:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (Postfix) with ESMTP id 6EC499FB32A for ; Thu, 5 Oct 2006 15:43:46 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 1002C6F910; Thu, 5 Oct 2006 15:43:41 -0300 (ART) Received: from bugs.unl.edu.ar ([127.0.0.1]) by localhost (bugs.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3ofj5grKkYOw; Thu, 5 Oct 2006 15:43:40 -0300 (ART) Received: by bugs.unl.edu.ar (Postfix, from userid 33) id 07D196F90A; Thu, 5 Oct 2006 15:43:39 -0300 (ART) To: Tom Lane Subject: Re: age() vs. timestamp substraction MIME-Version: 1.0 Date: Thu, 5 Oct 2006 15:43:39 -0300 From: Martin Marques Cc: pgsql-sql@postgresql.org Organization: Cetul - UNL In-Reply-To: <29752.1160073444@sss.pgh.pa.us> References: <29752.1160073444@sss.pgh.pa.us> Message-ID: X-Sender: martin@bugs.unl.edu.ar User-Agent: RoundCube Webmail/0.1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.028 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/64 X-Sequence-Number: 26453 On Thu, 05 Oct 2006 14:37:24 -0400, Tom Lane wrote: > 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. Ignore anything I said. Just realized it said current_date. :-( Sorry. -- --------------------------------------------------------- Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------