Something
public text v1 · immutableCREATE OR REPLACE FUNCTION test_fnc(bigint)
RETURNS int AS
$BODY$
BEGIN
RAISE EXCEPTION 'This error is generated from stored function...';
return 1;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION test_fnc(bigint) OWNER TO livechat;
CREATE OR REPLACE FUNCTION test_fnc2(bigint)
RETURNS int AS
$BODY$
BEGIN
perform test_fnc(1);
return 2;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION test_fnc2(bigint) OWNER TO livechat;
select * from test_fnc2(1)