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
int4?
create table ints (
inte
int4
);
create function func1() returns int4 as '
select coalesce(sum(inte),0) from ints;
' language 'sql';
create function func2() returns int4 as '
select coalesce(sum(inte)::int4,0) from ints;
' language 'sql';
begin:vcard n:Bateman;Kyle x-mozilla-html:FALSE org:Action Target Inc. adr:;;;;;; version:2.1 email;internet:[EMAIL PROTECTED] title:President x-mozilla-cpt:;0 fn:Kyle Bateman end:vcard
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]