User Tools

Site Tools


postgresqlfunctions

This is an old revision of the document!


This function returns a KPV id when you enter a KPV name …

CREATE OR REPLACE FUNCTION get_kpvid(kpvname text) RETURNS int
AS $$
#print_strict_params on
DECLARE
kpv_id int;
BEGIN
    SELECT key_point_values.id INTO STRICT kpv_id
        FROM key_point_values WHERE key_point_values.name = get_kpvid.kpvname;
    RETURN kpv_id;
END;
$$ LANGUAGE plpgsql;
postgresqlfunctions.1669215203.txt.gz · Last modified: 2025/03/08 22:23 (external edit)