[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. 1b3867822b20dc5e7dd6ae7e90ed30d6b9c6ece2
Evergreen Git
git at git.evergreen-ils.org
Tue Oct 1 15:25:21 EDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_3 has been updated
via 1b3867822b20dc5e7dd6ae7e90ed30d6b9c6ece2 (commit)
via c4eb5f14666e3a5a782df10b994fac3572244009 (commit)
via f240b366613e404749ef6fc8de1afc9e88930e8a (commit)
from 4af104b7aee90f7232d9011f1bc981a252a2c725 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1b3867822b20dc5e7dd6ae7e90ed30d6b9c6ece2
Author: Jason Boyer <jboyer at equinoxinitiative.org>
Date: Tue Oct 1 15:10:56 2019 -0400
LP#1768141: Stamping Upgrade Script
Signed-off-by: Jason Boyer <jboyer at equinoxinitiative.org>
diff --git a/Open-ILS/src/sql/Pg/upgrade/1185.schema.mark_perm_grp_descendants_stable.sql b/Open-ILS/src/sql/Pg/upgrade/1185.schema.mark_perm_grp_descendants_stable.sql
new file mode 100644
index 0000000000..0df191ee97
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/1185.schema.mark_perm_grp_descendants_stable.sql
@@ -0,0 +1,7 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1185', :eg_version); -- csharp / gmcharlt / jboyer
+
+ALTER FUNCTION permission.grp_descendants( INT ) STABLE;
+
+COMMIT;
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
deleted file mode 100644
index 5dcad46c36..0000000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-ALTER FUNCTION permission.grp_descendants( INT ) STABLE;
-
-COMMIT;
commit c4eb5f14666e3a5a782df10b994fac3572244009
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Fri Aug 2 10:41:44 2019 -0400
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 <gmc at equinoxinitiative.org>
Signed-off-by: Jason Boyer <jboyer at equinoxinitiative.org>
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;
commit f240b366613e404749ef6fc8de1afc9e88930e8a
Author: Chris Sharp <csharp at georgialibraries.org>
Date: Mon May 20 16:14:00 2019 -0400
LP#1768141 - Mark permission.grp_descendants STABLE.
Quoting Galen Charlton's comments on the bug report:
The database function permission.grp_descendants should
be marked stable; it qualifies, and doing so should allow
PostgreSQL to improve query plans. One example of a query
that would benefit is searching by patron profile (a la
bug 1497322)
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Jason Boyer <jboyer at equinoxinitiative.org>
diff --git a/Open-ILS/src/sql/Pg/006.schema.permissions.sql b/Open-ILS/src/sql/Pg/006.schema.permissions.sql
index 564f7852f9..05d38a6243 100644
--- a/Open-ILS/src/sql/Pg/006.schema.permissions.sql
+++ b/Open-ILS/src/sql/Pg/006.schema.permissions.sql
@@ -133,7 +133,7 @@ CREATE OR REPLACE FUNCTION permission.grp_descendants( INT ) RETURNS SETOF permi
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 ROWS 1;
+$$ LANGUAGE SQL STABLE ROWS 1;
CREATE OR REPLACE FUNCTION permission.grp_tree_full_path ( INT ) RETURNS SETOF permission.grp_tree AS $$
SELECT *
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
new file mode 100644
index 0000000000..35244339a4
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.mark_perm_grp_descendants_stable.sql
@@ -0,0 +1,19 @@
+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;
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/006.schema.permissions.sql | 2 +-
.../Pg/upgrade/1185.schema.mark_perm_grp_descendants_stable.sql | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/1185.schema.mark_perm_grp_descendants_stable.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list