![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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) |
#3
| |||
| |||
|
|
Actually, the definition of the single-parameter variants of age() is =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ag e(current_date, $1) not =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ag e(now(), $1) I'm not sure this is wrong, but perhaps it should be better documented. |
![]() |
| Thread Tools | |
| Display Modes | |
| |