LP#1413660 Mark 39.50 config function STABLE
authorBill Erickson <berickxx@gmail.com>
Thu, 22 Jan 2015 16:57:43 +0000 (11:57 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 3 Feb 2015 21:10:29 +0000 (16:10 -0500)
Mark SQL function evergreen.z3950_attr_name_is_valid(text) as STABLE
instead of IMMUTABLE, since the output may vary with a single input over
time.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39_func_stable.sql [new file with mode: 0644]

index 7f4aa2d..4405cfc 100644 (file)
@@ -1050,7 +1050,7 @@ ALTER TABLE config.best_hold_order ADD CHECK ((
 CREATE OR REPLACE FUNCTION 
     evergreen.z3950_attr_name_is_valid(TEXT) RETURNS BOOLEAN AS $func$
     SELECT EXISTS (SELECT 1 FROM config.z3950_attr WHERE name = $1);
-$func$ LANGUAGE SQL STRICT IMMUTABLE;
+$func$ LANGUAGE SQL STRICT STABLE;
 
 COMMENT ON FUNCTION evergreen.z3950_attr_name_is_valid(TEXT) IS $$
 Results in TRUE if there exists at least one config.z3950_attr
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39_func_stable.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39_func_stable.sql
new file mode 100644 (file)
index 0000000..31a44d7
--- /dev/null
@@ -0,0 +1,5 @@
+BEGIN;
+
+ALTER FUNCTION evergreen.z3950_attr_name_is_valid (TEXT) STABLE;
+
+COMMIT;