Re: Weird function behavior from Sept 11 snapshot

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird function behavior from Sept 11 snapshot
Date: 2000-09-12 13:53:13
Message-ID: 7015.968766793@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mike Mascari <mascarm(at)mascari(dot)com> writes:
> Under the snapshot from yesterday:
> ---------------------------------

> template1=# create function crap(int4) returns int4
> as 'select sum(key) from test' language 'sql';
> ERROR: return type mismatch in function: declared to return
> int4, returns numeric

I changed sum() on integer types to return numeric as a way of
avoiding overflow. Also avg() on integers now returns numeric
so that you can get some fractional precision. If you think this
was a bad idea, there's still time to debate it ... but we've had
repeated complaints about both of those issues.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-09-12 13:54:39 Re: Dibs for upcoming commit
Previous Message Jules Bean 2000-09-12 12:45:45 Re: Performance improvement hints