Inconsistent behavior with AGE()

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Inconsistent behavior with AGE()
Дата
Msg-id 200410281356.25970.josh@agliodbs.com
обсуждение исходный текст
Ответы Re: Inconsistent behavior with AGE()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Folks,

Pardon me if this is redundant, but again the pgsql-bugs archives are not
working.

Summary:  Various versions of AGE() give inconsistent results
Versions Tested: 7.4.2, 7.4.3, 8.0b4
Severity:  Annoyance
Description:  The age() built-in function sometimes truncates hours, minutes
and seconds, and sometimes it doesn't, depending on the parameters.   This
seems inconsistent and confusing.

gforge=> select age('2004-01-01'::TIMESTAMP);
      age
----------------
 9 mons 27 days
(1 row)

gforge=> select age(now(),'2004-01-01'::TIMESTAMP);
                age
------------------------------------
 9 mons 27 days 11:17:19.8895479999
(1 row)

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: PREPARE(d) statements and modifying columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Inconsistent behavior with AGE()