upgrade.sql -> upgrade191.sql
This commit is contained in:
parent
edc0a3f238
commit
187ca58864
3 changed files with 32 additions and 29 deletions
|
|
@ -123,7 +123,7 @@ if (!defined("NOALYSS_PACKAGE_REPOSITORY")) {
|
|||
if (!defined("SYSINFO_DISPLAY")) {
|
||||
define("SYSINFO_DISPLAY", TRUE);
|
||||
}
|
||||
define("DBVERSION", 191);
|
||||
define("DBVERSION", 192);
|
||||
define("MONO_DATABASE", 25);
|
||||
define("DBVERSIONREPO", 20);
|
||||
define('NOTFOUND', '--not found--');
|
||||
|
|
|
|||
31
include/sql/patch/upgrade191.sql
Normal file
31
include/sql/patch/upgrade191.sql
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
begin;
|
||||
|
||||
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$;
|
||||
|
||||
insert into version (val,v_description) values (192,'2323 : tree for depending event');
|
||||
commit;
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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