Re: [HACKERS] 6.5.0 - Overflow bug in AVG( ) - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] 6.5.0 - Overflow bug in AVG( )
Date
Msg-id 3767B2CA.9E69AB2@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] 6.5.0 - Overflow bug in AVG( )  (wieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] 6.5.0 - Overflow bug in AVG( )
List pgsql-hackers
> > Of course. These are integer fields? I've been considering changing
> > all accumulators (and results) for integer aggregate functions to
> > float8, but have not done so yet. I was sort of waiting for a v7.0
> > release, but am not sure why...
> 
>     Wouldn't  it  be better to use NUMERIC for the avg(int) state
>     values?  It will never loose any significant digit.

Sure. It would be fast, right? avg(int) is likely to be used a lot,
and should be as fast as possible.
                  - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Postgres mailing lists
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] decimal & numeric report bug