Re: age() vs. timestamp substraction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: age() vs. timestamp substraction
Date: 2006-10-05 18:37:24
Message-ID: 29752.1160073444@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Marques 2006-10-05 18:43:39 Re: age() vs. timestamp substraction
Previous Message Andrew Sullivan 2006-10-05 18:31:28 Re: Assigning a timestamp without timezone to a timestamp