Re: [SQL] Possible 7.1RC1 bug

2001-03-30 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> 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 ca

Re: [SQL] Possible 7.1RC1 bug

2001-03-30 Thread Josh Berkus
Tom, > 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" behavio

Re: [SQL] Possible 7.1RC1 bug

2001-03-30 Thread Tom Lane
Kyle <[EMAIL PROTECTED]> 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

[SQL] Possible 7.1RC1 bug

2001-03-29 Thread Kyle
Here's a fragment of code that works on 7.0.3 but gives a type mismatch on 7.1: Under 7.1RC1, func1 fails and func2 builds OK.  The error is: ERROR:  return type mismatch in function: declared to return int4, returns numeric It appears that sum(int4) returns type numeric.  Shouldn't it return int