)
WHERE mbe.sort_value >= public.naco_normalize($2)
ORDER BY mbe.sort_value, mbe.value LIMIT 1;
-$p$ LANGUAGE SQL;
+$p$ LANGUAGE SQL STABLE;
CREATE OR REPLACE FUNCTION metabib.browse_authority_pivot(
INT[],
)
WHERE mbe.sort_value >= public.naco_normalize($2)
ORDER BY mbe.sort_value, mbe.value LIMIT 1;
-$p$ LANGUAGE SQL;
+$p$ LANGUAGE SQL STABLE;
CREATE OR REPLACE FUNCTION metabib.browse_authority_refs_pivot(
INT[],
)
WHERE mbe.sort_value >= public.naco_normalize($2)
ORDER BY mbe.sort_value, mbe.value LIMIT 1;
-$p$ LANGUAGE SQL;
+$p$ LANGUAGE SQL STABLE;
CREATE OR REPLACE FUNCTION metabib.browse_pivot(
INT[],
metabib.browse_authority_refs_pivot($1,$2) -- only look in 4xx, 5xx, 7xx of authority
)
ORDER BY sort_value, value LIMIT 1;
-$p$ LANGUAGE SQL;
+$p$ LANGUAGE SQL STABLE;
CREATE OR REPLACE FUNCTION metabib.staged_browse(
--- /dev/null
+BEGIN;
+
+-- check whether patch can be applied
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER FUNCTION metabib.browse_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_bib_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_authority_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_authority_refs_pivot (integer[], text) STABLE;
+
+COMMIT;