date function 'age' problem - Mailing list pgsql-bugs

From Konrad Gdowski
Subject date function 'age' problem
Date
Msg-id NEBBKCCMCKJFAGKKEMNCEEAHCGAA.konrad@spox.org
Whole thread Raw
List pgsql-bugs
hello

i've got the following error:

here is the output:

#######################################################################
osk=> select age('2001-03-29','2001-03-01');
      age
---------------
 27 days 23:00
(1 row)

osk=> select age('2002-03-29','2002-03-01');
  age
-------
 1 mon
(1 row)

osk=> select version();
                            version
---------------------------------------------------------------
 PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.95.4
(1 row)

osk=>

#####################################################################

look at the difference betwen results of execution function 'age' for the
same time interval in year 2001 and 2002. why there is '1 mon' when it
should be '27 days'.
thanks for any solutions to this problem.

best regards
konrad gdowski

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: SEGV in contrib/array/array_iterator.c
Next
From: Ryan Grange
Date:
Subject: PGAccess and apostrophes...