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   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to