From: | Kyle <kyle(at)actarg(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Possible 7.1RC1 bug |
Date: | 2001-03-29 20:02:14 |
Message-ID: | 3AC394C6.E7D2E184@actarg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
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';
Attachment | Content-Type | Size |
---|---|---|
kyle.vcf | text/x-vcard | 185 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2001-03-30 02:49:11 | RE: [HACKERS] Re: possible row locking bug in 7.0.3 & 7.1 |
Previous Message | Peter Eisentraut | 2001-03-29 19:03:53 | Re: Calling Java from psql (was Re: requesting help) |