Re: Weird function behavior from Sept 11 snapshot

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird function behavior from Sept 11 snapshot
Дата
Msg-id 7015.968766793@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Weird function behavior from Sept 11 snapshot  (Mike Mascari <mascarm@mascari.com>)
Список pgsql-hackers
Mike Mascari <mascarm@mascari.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Dibs for upcoming commit
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Weird function behavior from Sept 11 snapshot