From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Possible 7.1RC1 bug
Date: Sat, 31 Mar 2001 00:33:10 -0500
Message-ID: <22126.986016790@sss.pgh.pa.us> (raw)
In-Reply-To: <web-31925@davinci.ethosmedia.com>
References: <web-31925@davinci.ethosmedia.com>
"Josh Berkus" <josh@agliodbs.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
Subject: Re: Possible 7.1RC1 bug
In-Reply-To: <22126.986016790@sss.pgh.pa.us>
References: <web-31925@davinci.ethosmedia.com> <22126.986016790@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox