From: Bill Erickson Date: Wed, 8 Feb 2012 15:32:44 +0000 (-0500) Subject: Stamping upgrade for LP#928896 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e8857f2ae267956136b9f4ee3f3263c11ea2c7ae;p=evergreen%2Fpines.git Stamping upgrade for LP#928896 Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 9914d607b8..f596fa28ba 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0674', :eg_version); -- phasefx/Dyrcona/senator +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0675', :eg_version); -- gmc/berick CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql b/Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql new file mode 100644 index 0000000000..0c7c8e37ed --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql @@ -0,0 +1,12 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0675', :eg_version); + +-- set expected row count to low value to avoid problem +-- where use of this function by the circ tagging feature +-- results in full scans of asset.call_number +CREATE OR REPLACE FUNCTION action.usr_visible_circ_copies( INTEGER ) RETURNS SETOF BIGINT AS $$ + SELECT DISTINCT(target_copy) FROM action.usr_visible_circs($1) +$$ LANGUAGE SQL ROWS 10; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql deleted file mode 100644 index a191fb498f..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN; - --- set expected row count to low value to avoid problem --- where use of this function by the circ tagging feature --- results in full scans of asset.call_number -CREATE OR REPLACE FUNCTION action.usr_visible_circ_copies( INTEGER ) RETURNS SETOF BIGINT AS $$ - SELECT DISTINCT(target_copy) FROM action.usr_visible_circs($1) -$$ LANGUAGE SQL ROWS 10; - -COMMIT;