Merge
This commit is contained in:
commit
edc0a3f238
10 changed files with 190 additions and 119 deletions
|
|
@ -0,0 +1,28 @@
|
|||
CREATE OR REPLACE FUNCTION comptaproc.get_follow_up_tree(action_gestion_id integer)
|
||||
RETURNS SETOF integer
|
||||
|
||||
LANGUAGE plpgsql
|
||||
AS $function$
|
||||
declare
|
||||
i int;
|
||||
x int;
|
||||
e int;
|
||||
begin
|
||||
for x in select aga_least
|
||||
from action_gestion_related
|
||||
where
|
||||
aga_greatest = action_gestion_id
|
||||
loop
|
||||
return next x;
|
||||
|
||||
for e in select * from comptaproc.get_follow_up_tree(x)
|
||||
loop
|
||||
return next e;
|
||||
end loop;
|
||||
|
||||
end loop;
|
||||
return;
|
||||
end;
|
||||
$function$
|
||||
;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue