The following function's metadata is not correctly reported in the pg_proc table (see picture below).
CREATE OR REPLACE FUNCTION scm.get_period_type_adjustment(period_type_id integer)
RETURNS numeric
LANGUAGE plpgsql
IMMUTABLE
AS $function$
------
begin
return (case
when period_type_id in (1) then 1.0
when period_type_id in (2, 17, 4, 3) then 0.25
when period_type_id = 10 then 0.5
else 1
end)::numeric;
end;
$function$
;
--
Walker Philips
Data Engineering Consultant
Saguaro Capital Management