From 0299e72a900f710bf1380e7bbae6e8a52f9dadff Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 2 Aug 2019 10:41:44 -0400 Subject: [PATCH] LP#1768141: (follow-up) change schema update Change the update to an "ALTER FUNCTION ... STABLE" both to make the purpose of the update more clear and to remove the need to check the rest of the function definition when backporting. Signed-off-by: Galen Charlton Signed-off-by: Jason Boyer --- ...XXX.schema.mark_perm_grp_descendants_stable.sql | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql index 35244339a4..5dcad46c36 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql @@ -2,18 +2,6 @@ BEGIN; SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); -CREATE OR REPLACE FUNCTION permission.grp_descendants( INT ) RETURNS SETOF permission.grp_tree AS $$ - WITH RECURSIVE descendant_depth AS ( - SELECT gr.id, - gr.parent - FROM permission.grp_tree gr - WHERE gr.id = $1 - UNION ALL - SELECT gr.id, - gr.parent - FROM permission.grp_tree gr - JOIN descendant_depth dd ON (dd.id = gr.parent) - ) SELECT gr.* FROM permission.grp_tree gr JOIN descendant_depth USING (id); -$$ LANGUAGE SQL STABLE ROWS 1; +ALTER FUNCTION permission.grp_descendants( INT ) STABLE; COMMIT; -- 2.43.2