From: Jane Sandberg Date: Thu, 6 Aug 2020 15:08:50 +0000 (-0700) Subject: LP#1778955: fixing upgrade script, removing duplicate function definition X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8c79f68901347403a0cd669db4e7b12031ab5aa1;p=Evergreen.git LP#1778955: fixing upgrade script, removing duplicate function definition Signed-off-by: Jane Sandberg Signed-off-by: Rogan Hamby Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/990.schema.unapi.sql b/Open-ILS/src/sql/Pg/990.schema.unapi.sql index 2f50ebbbc8..241f82904b 100644 --- a/Open-ILS/src/sql/Pg/990.schema.unapi.sql +++ b/Open-ILS/src/sql/Pg/990.schema.unapi.sql @@ -8,11 +8,6 @@ RETURNS actor.org_unit AS $$ SELECT * FROM actor.org_unit WHERE parent_ou IS NULL LIMIT 1; $$ LANGUAGE SQL STABLE; -CREATE OR REPLACE FUNCTION array_remove(inp ANYARRAY, el ANYELEMENT) -RETURNS anyarray AS $$ - SELECT ARRAY_AGG(x.e) FROM UNNEST( $1 ) x(e) WHERE x.e <> $2; -$$ LANGUAGE SQL STABLE; - CREATE OR REPLACE FUNCTION evergreen.rank_ou(lib INT, search_lib INT, pref_lib INT DEFAULT NULL) RETURNS INTEGER AS $$ SELECT COALESCE( diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.builtin_array_remove.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.builtin_array_remove.sql index 9c404152ac..f1f5e60f12 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.builtin_array_remove.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.builtin_array_remove.sql @@ -1137,11 +1137,6 @@ BEGIN END; $func$ LANGUAGE PLPGSQL; -COMMIT; - - sort_value TEXT -); - CREATE OR REPLACE FUNCTION biblio.extract_metabib_field_entry ( rid BIGINT, default_joiner TEXT, @@ -1348,8 +1343,8 @@ BEGIN END; $func$ LANGUAGE PLPGSQL; --- Shall we drop it? --- DROP FUNCTION evergreen.array_remove_item_by_value(ANYARRAY, ANYELEMENT) +-- We no longer need the custom function +DROP FUNCTION evergreen.array_remove_item_by_value(ANYARRAY, ANYELEMENT); COMMIT;