Re: Possible 7.1RC1 bug - Mailing list pgsql-sql

From Tom Lane
Subject Re: Possible 7.1RC1 bug
Date
Msg-id 1088.985966416@sss.pgh.pa.us
Whole thread Raw
In response to Possible 7.1RC1 bug  (Kyle <kyle@actarg.com>)
Responses Re: Possible 7.1RC1 bug  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
Kyle <kyle@actarg.com> writes:
> It appears that sum(int4) returns type numeric.  Shouldn't it return
> int4?

This is not a bug.  It's a deliberate change in behavior: sum() and
avg() on integer datatypes now return numeric, to avoid problems with
overflow.
        regards, tom lane


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: primary key scans in sequence
Next
From: "Josh Berkus"
Date:
Subject: Re: Possible 7.1RC1 bug