2 Jan 2004 02:50
Stored procedures
beyaRecords - The home Urban music <uzo <at> beya-records.com>
2004-01-02 01:50:25 GMT
2004-01-02 01:50:25 GMT
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
'
language 'plpgsql';
I am calling the procedure as follows:
select clientRec('tmpg60');
I am getting the following error:
ERROR: set-valued function called in context that cannot accept a set
CONTEXT: PL/
pgSQL function "pg_clientRec" while casting return value to function's r
eturn type
What am I doing wrong????
(Continue reading)
.
It would probably be helpful if this message included a cursor location...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
RSS Feed