Re: avg() bug? - Mailing list pgsql-general

From Tom Lane
Subject Re: avg() bug?
Date
Msg-id 20089.983813858@sss.pgh.pa.us
Whole thread Raw
In response to avg() bug?  (Patrik Kudo <kudo@partitur.se>)
Responses Re: avg() bug?
List pgsql-general
Patrik Kudo <kudo@partitur.se> writes:
> I suppose avg() does a sum()/count() where sum returns a int2,
> which will be too small to contain the sum if the table contains
> many values?

Yes.  This is changed in 7.1 --- sum() and avg() of int values now
return type 'numeric'.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: chinese_big5 for PgAccess
Next
From: Patrik Kudo
Date:
Subject: Re: avg() bug?