Tom Lane wrote:
> "Frank F. Burmo" <fburmo(at)online(dot)no> writes:
> > The following avg()-call gives me a result of: "2 days,
> > 27:53:49.359573"... which must be wrong. There are only 24 hours in
> > a day.
> That's a false premise. Days and hours/minutes/seconds are
> independent components of an interval.
I don't understand how it does the computation then. None of his input
data contains hour/minute/second components in excess of 24 hours, so
to arrive at 27-some hours it must have pulled over some days.
Moreover, my system thinks that the average of '1 day 12 hours' and '8
hours' is 22 hours, and also that the average of '2 days' and '3 days'
is 2 days and 12 hours, so it does make the assumption that 1 day = 24
In response to
pgsql-bugs by date
|Next:||From: Anthony Taylor||Date: 2007-02-12 23:59:31|
|Subject: BUG #2996: to_char( timestamp, 'DD-Mon-YYYY HH24:MI:SS.MS' ) reports .1000 ms|
|Previous:||From: Tom Lane||Date: 2007-02-12 21:14:49|
|Subject: Re: BUG #2994: avg() calculates wrong on Interval-type |