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.0108142246370.677-100000@peter.localdomain
Whole thread Raw
In response to Re: Re: Use int8 for int4/int2 aggregate accumulators?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> We could try to force-convert the result of an SQL function to the right
> thing, I suppose, but I'm worried that that might mask programmer errors
> more than it helps.

What I had in mind was to allow type conversion between the same
TypeCategory().  The SQL function analyzer is extraordinarily picky:

create function test(int) returns varchar as '   select substring(''PostgreSQL'' from $1);
' language sql;
ERROR:  return type mismatch in function: declared to return character
varying, returns text

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Use int8 for int4/int2 aggregate accumulators?
Next
From: Tom Lane
Date:
Subject: Re: int8 sequences --- small implementation problem