Equivalent or alternative method for RAISE EXCEPTION statement for function in LANGUAGE sql?
- 阅读更多 关于 Equivalent or alternative method for RAISE EXCEPTION statement for function in LANGUAGE sql?
问题 Is there an equivalent (or workaround) for the RAISE EXCEPTION statement for the function written below in LANGUAGE sql ? CREATE OR REPLACE FUNCTION fn_interpolation (p_yearinteger integer, p_admin_id integer, p_crop_id integer, p_cropparameter integer) RETURNS TABLE (value double precision, remark text) AS $$ WITH yearvalues AS (SELECT yearinteger, value FROM cropvalues WHERE crops_id = p_crop_id AND admin_id = p_admin_id AND parameter_id = p_cropparameter), I need the function to abort and