From: | 史绪良 <shixl(at)neusoft(dot)com> |
---|---|
To: | pgsql-general(at)PostgreSQL(dot)org |
Subject: | consultation! |
Date: | 2002-11-22 02:01:11 |
Message-ID: | 01eb01c291cb$07eff470$791da8c0@neusoftf5t0ucx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hello!!!
postgres 7.3.b4
for example:
**************************
drop function plproc_proc1_func(int, int);
drop view plproc_proc1_view;
create view plproc_proc1_view(p1, p2) as select cast(null as int), cast(null as int);
create function plproc_proc1_func(int, int) returns plproc_proc1_view as '
declare
ret record;
-- declare the params
p1 alias for $1;
p2 int;
begin
p2 := p1 + 100;
-- set output
select p1, p2 into ret;
return ret;
end;
'language 'plpgsql';
**************************
Now, the example the same as “
create procedure proc1(p1 in int, p2 out int)
begin
p2:=p1+100;
end
”
The function “plproc_proc1_func(int, int)” can return more values by this way!!
I want to know whether can return more values needn't create view or table!
From | Date | Subject | |
---|---|---|---|
Next Message | Egyud Csaba | 2002-11-22 02:25:39 | Re: Welcom & a problem |
Previous Message | Medi Montaseri | 2002-11-22 00:11:04 | Re: Request assistance connecting with Pg::connectdb |