[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 8af2060262a063a7577de4b966ed2fb3535620d0
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_1 has been updated
via 8af2060262a063a7577de4b966ed2fb3535620d0 (commit)
via 50e30971f5b566c9c045b34bcbe20e967e3a35d8 (commit)
via 88e058e8dfe60e2fa65cd06295d22daf6e575a61 (commit)
from 8e5565c01d6a72918d782ba900547941089debfe (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 8af2060262a063a7577de4b966ed2fb3535620d0
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 50e30971f5b566c9c045b34bcbe20e967e3a35d8
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 88e058e8dfe60e2fa65cd06295d22daf6e575a61
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 df154fbf6c..4e1083e92f 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