On Mon, Nov 29, 2004 at 11:37:50 +0000,
PostgreSQL Bugs List <pgsql-bugs@postgresql.org> wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1332
> Logged by: Robert Grabowski
>
> Email address: grabba@env.pl
>
> PostgreSQL version: 7.4.6
>
> Operating system: Linux
>
> Description: wrong results from age function
>
> Details:
>
> select age('2004-02-01'::date, '2004-01-01'::date);
> age
> -------
> 1 mon
> (1 row)
>
> select age('2004-03-01'::date, '2004-02-01'::date);
> age
> ---------
> 29 days
> (1 row)
>
> I think, it should be "1 mon".
I get "1 mon" when I try this:
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
area=> select age('2004-03-01'::date, '2004-02-01'::date);
age
-------
1 mon
(1 row)
I am actually using a version post 7.4.6 from cvs. I have also built
postgres using integer date time values.