Re: age() vs. timestamp substraction

Поиск
Список
Период
Сортировка
Искать
От
Jean-Paul Argudo
Тема
Re: age() vs. timestamp substraction
Дата
Msg-id
45262362.4030101@argudo.org
Ответ на
Список
Дерево обсуждения
age() vs. timestamp substraction Martin Marques <martin@bugs.unl.edu.ar>
Re: age() vs. timestamp substraction Tom Lane <tgl@sss.pgh.pa.us>
Re: age() vs. timestamp substraction Jean-Paul Argudo <jean-paul@argudo.org>
Re: age() vs. timestamp substraction Stephan Szabo <sszabo@megazone.bigpanda.com>
Re: age() vs. timestamp substraction Martin Marques <martin@bugs.unl.edu.ar>
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 (stupidly) as a string *with* hour is "current
date at mid-day":


test=# select to_char(current_date,'YYYY-MM-DD HH:MI:SS');      to_char
---------------------2006-10-06 12:00:00
(1 ligne)

It was a day when I had to debug a strange behaviour in a customer's
(bad) code :-)

Cheers,

-- 
Jean-Paul Argudo
www.PostgreSQLFr.org
www.dalibo.com

В списке pgsql-sql по дате отправления
От: Jim Nasby
Дата:
От: Stephan Szabo
Дата:
FAQ