Thread: consultation!

consultation!

From
史绪良
Date:
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!