Received: from sss.pgh.pa.us ([216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2V5XEK93194 for ; Sat, 31 Mar 2001 00:33:14 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2V5XBw22129; Sat, 31 Mar 2001 00:33:11 -0500 (EST) To: "Josh Berkus" cc: pgsql-sql@postgresql.org Subject: Re: Possible 7.1RC1 bug In-reply-to: References: Comments: In-reply-to "Josh Berkus" message dated "Fri, 30 Mar 2001 09:37:31 -0800" Date: Sat, 31 Mar 2001 00:33:10 -0500 Message-ID: <22126.986016790@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/654 X-Sequence-Number: 2333 "Josh Berkus" 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