Juan Francisco Diaz wrote:
> Hi I modified my function to:
>
> CREATE FUNCTION buscablista (character varying, character varying) RETURNS
> SETOF cabezalista
> AS '
>
> select * from cabezalista where idlista like CAST($1 AS CHAR(20)) and
> idlibro like CAST($2 AS CHAR(6));
>
> ' LANGUAGE sql;
>
> But when called it gives me the error:
>
> ERROR: Query-specified return tuple and actual function return tuple do not
> match
> ERROR: Query-specified return tuple and actual function return tuple do not
> match
I guess that you are calling the function like is a function:
select buscablista('foo', 'bar');
the function is a Table Function so :
select * from buscablista('foo', 'bar');
Regards
Gaetano Mendola