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

From Steffen Macke
Subject BUG #2767: Bug in avg(interval)
Date
Msg-id 200611180717.kAI7Hpcd071631@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2767: Bug in avg(interval)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2767
Logged by:          Steffen Macke
Email address:      sdteffen@gmail.com
PostgreSQL version: 8.1.4
Operating system:   Windows XP
Description:        Bug in avg(interval)
Details:

select avg(interval) is occasionally returning wrong
values:

Example:

select avg(test) from problem

returns

1 day 25:15:30

while the correct result is

2 days 01:15:30

Here is a table with sample data used:

CREATE TABLE problem (
    test interval
);
COPY problem (test) FROM stdin;
1 day 20:39:28
4 days 00:02:53
1 day 00:03:01
2 days 02:08:34
01:33:34
3 days 07:05:35
\.

pgsql-bugs by date:

Previous
From: manisha balwadkar
Date:
Subject: Stored Procedure with more than one OUT Parameter
Next
From: "Mikko Tiihonen"
Date:
Subject: BUG #2768: dates before year 1600 in timestamptz column give strange results