From: | beyaRecords - The home Urban music <uzo(at)beya-records(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Stored procedures |
Date: | 2004-01-02 01:50:25 |
Message-ID: | 08C87AE5-3CC6-11D8-AB42-0003938366A4@beya-records.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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????
regards
Uzo
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-02 02:10:21 | Re: Stored procedures |
Previous Message | Dinesh Pandey | 2004-01-01 10:09:06 | Re: index row size 2728 exceeds btree maximum, 2713 |