Re: Re: Use int8 for int4/int2 aggregate accumulators? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Re: Use int8 for int4/int2 aggregate accumulators?
Date
Msg-id Pine.LNX.4.30.0108141656560.677-100000@peter.localdomain
Whole thread Raw
In response to Re: Use int8 for int4/int2 aggregate accumulators?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> I started working on this, and immediately got a pile of regression test
> failures arising from:
>
>   create function rtest_viewfunc1(int4) returns int4 as
>         'select count(*) from rtest_view2 where a = $1'
>         language 'sql';
> + ERROR:  return type mismatch in function: declared to return integer, returns bigint

Maybe instead of testing for strict equality of the types, test for
compatibility.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Liam Stewart
Date:
Subject: RFC: Inserting multiple values via INSERT ... VALUES ...
Next
From: Peter Eisentraut
Date:
Subject: Re: OID unsigned long long