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>
- [SQL] Complex SQL query and pe... Adam Witney
- Re: [SQL] Complex SQL quer... Tom Lane
- Re: [SQL] Stored Procedures david williams
- Re: [SQL] Stored procedures Franco Bruno Borghesi
- Re: [SQL] Stored procedures Franco Bruno Borghesi
- [SQL] Stored Procedures beyaRecords - The home Urban music
- Re: [SQL] Stored Procedures Michael Fuhr
- Re: [SQL] Stored Procedures Christopher Browne
- [SQL] Installing pgplsql on po... beyaRecords - The home Urban music
- Re: [SQL] Installing pgpls... Michael Fuhr
- Re: [SQL] Stored procedures beyaRecords - The home Urban music
- Re: [SQL] Stored procedures Tom Lane
