Re: BUG #2767: Bug in avg(interval) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2767: Bug in avg(interval)
Date
Msg-id 16591.1164074056@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2767: Bug in avg(interval)  ("Steffen Macke" <sdteffen@gmail.com>)
Responses Re: BUG #2767: Bug in avg(interval)
List pgsql-bugs
"Steffen Macke" <sdteffen@gmail.com> writes:
> select avg(test) from problem
> returns
> 1 day 25:15:30
> while the correct result is
> 2 days 01:15:30

This is not a bug; it's the result you're supposed to get.
But see justify_hours() if you want to fold up 24 hours to 1 day.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Reece Hart
Date:
Subject: Re: BUG #2764: Capital letter in tables or columns not
Next
From: Tom Lane
Date:
Subject: Re: BUG #2768: dates before year 1600 in timestamptz column give strange results