consultation! - Mailing list pgsql-general

From 史绪良
Subject consultation!
Date
Msg-id 01eb01c291cb$07eff470$791da8c0@neusoftf5t0ucx
Whole thread Raw
List 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!

 
 

pgsql-general by date:

Previous
From: "Damjan Pipan"
Date:
Subject: Re: modifying new tuple on insert in c trigger
Next
From: Hans-Jürgen Schönig
Date:
Subject: Using SHOW in PL/pgSQL