Hi,
I am having problems with a stored procedure (plpgsql) that takes in a value and returns a record set.
my code is as follow:

create function pg_clientRec(text) setof record as
'
declare
customerID ALIAS $1;
rec record;

begin
select into rec * from troubletickets where custID = customerID;
return rec;
end
'
<x-tad-bigger>language 'plpgsql';

I am calling the procedure as follows:

select clientRec('tmpg60');

I am getting the following error:

</x-tad-bigger>
<x-tad-bigger>ERROR:��set-valued�function�called�in�context�that�cannot�accept�a�set
CONTEXT:��PL/pgSQL�function�"</x-tad-bigger>
pg_clientRec<x-tad-bigger>"�while�casting�return�value�to�function's�return�type

What am I doing wrong????


regards

Uzo</x-tad-bigger>

Reply via email to