I am new to PostgreSQL normally work with the MS-SQL stack, I would normally use the EXEC command inside a stored procedure to call other stored procedures, having trouble achieving the same thing in PostgreSQL.
I have written the below funciton to call the other function but I can't get it to work, can anyone see what I'm getting wrong?
CREATE OR REPLACE FUNCTION public.run_elt_functions ()
DO $$
BEGIN
PERFORM public.update_d_customer ();
PERFORM public.update_d_site ();
PERFORM public.update_d_service ();
PERFORM public.update_f_service ();
END; $$
LANGUAGE 'plpgsql';
When I run the above code and get this error: [2019-08-27 11:48:06] [42601] ERROR: syntax error at end of input
Can anyone help?
DOis an SQL statement that you use if you want to run PL/pgSQL in an SQL statement without the need to define a function.