Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.
Overloading Of A Stored Function In PostgreSQL || Stored Function Overloading || PL/pgSQL Tutorials
CREATE OR REPLACE FUNCTION public.testing_function(p_num1 numeric, p_num2 numeric)
RETURNS numeric
LANGUAGE 'plpgsql'
COST 100
VOLATILE
AS $BODY$
DECLARE
v_result numeric;
BEGIN
v_result := p_num1 + p_num2;
RETURN v_result;
END;
$BODY$;
CREATE OR REPLACE FUNCTION public.testing_function(p_num1 numeric, p_num2 numeric,p_num3 numeric)
RETURNS numeric
LANGUAGE 'plpgsql'
COST 100
VOLATILE
AS $BODY$
DECLARE
v_result numeric;
BEGIN
v_result := p_num1 + p_num2 + p_num3;
RETURN v_result;
END;
$BODY$;
CREATE OR REPLACE FUNCTION public.testing_function(p_num1 numeric, p_num2 numeric,p_num3 numeric,p_num4 numeric)
RETURNS numeric
LANGUAGE 'plpgsql'
COST 100
VOLATILE
AS $BODY$
DECLARE
v_result numeric;
BEGIN
v_result := p_num1 + p_num2 + p_num3 + p_num4;
RETURN v_result;
END;
$BODY$;
SELECT public.testing_function(14,5);
SELECT public.testing_function(14,10,50);
SELECT public.testing_function(10,20,30,50);
No comments:
Post a Comment