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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to