Re: Possible 7.1RC1 bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Possible 7.1RC1 bug
Date: 2001-03-31 05:33:10
Message-ID: 22126.986016790@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Josh Berkus" <josh(at)agliodbs(dot)com> writes:
>> 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.

> That could throw off some of my already-written views & functions. Is
> there a setting that can change this back to the "regular" behavior of
> sum(integer) = integer?

Sorry, no. You can coerce the result back to int4 if you care to risk
overflow: "select sum(int4field)::int4" or some such.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sharmad Naik 2001-03-31 07:24:39 Library Management project
Previous Message Bruce Momjian 2001-03-31 01:14:50 Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP