Mercurial > gemma
view schema/updates/1201/01.fix_support_functions.sql @ 5650:cb3c4ba0f052 DQR adjustments
Merged default branch
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Thu, 29 Jun 2023 13:18:54 +0200 |
parents | 8fcabb6f971e |
children |
line wrap: on
line source
CREATE OR REPLACE FUNCTION isrslt(a isrs, b isrs) RETURNS boolean AS $$ BEGIN RETURN public.isrs_cmp(a, b) < 0; END; $$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION isrsle(a isrs, b isrs) RETURNS boolean AS $$ BEGIN RETURN public.isrs_cmp(a, b) <= 0; END; $$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION isrseq(a isrs, b isrs) RETURNS boolean AS $$ BEGIN RETURN public.isrs_cmp(a, b) = 0; END; $$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION isrsge(a isrs, b isrs) RETURNS boolean AS $$ BEGIN RETURN public.isrs_cmp(a, b) >= 0; END; $$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION isrsgt(a isrs, b isrs) RETURNS boolean AS $$ BEGIN RETURN public.isrs_cmp(a, b) > 0; END; $$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION isrs_diff(a isrs, b isrs) RETURNS double precision AS $$ SELECT CAST(public.isrs_cmp(a, b) AS double precision) $$ LANGUAGE sql IMMUTABLE PARALLEL SAFE;