Re: [SQL] age() vs. timestamp substraction

2006-10-06 Thread Stephan Szabo
On Fri, 6 Oct 2006, Jean-Paul Argudo wrote: > Hi all, > > > 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. > > I'm jumping on this thread to point o

Re: [SQL] age() vs. timestamp substraction

2006-10-06 Thread Jean-Paul Argudo
Hi all, > 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. I'm jumping on this thread to point out a little strange thing to me. CURRENT_DATE, converted

Re: [SQL] age() vs. timestamp substraction

2006-10-05 Thread Martin Marques
On Thu, 05 Oct 2006 14:37:24 -0400, Tom Lane <[EMAIL PROTECTED]> 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

Re: [SQL] age() vs. timestamp substraction

2006-10-05 Thread Tom Lane
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

[SQL] age() vs. timestamp substraction

2006-10-05 Thread Martin Marques
I just found this problem with the age() function, which AFAIK should give the same resulte as a subtraction of the argument from now(), but it doesn't. prueba=> SELECT (now() - tc.last_cron),age(tc.last_cron),tc.intervalo FROM tareas_cron tc ; ?column? |