title: Can you call call perform/do functions from another function in PostgreSQL?
body: <p>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.</p>
  
  <p>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?</p>
  
  <pre><code>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';
  </code></pre>
  
  <p>When I run the above code and get this error:
  [2019-08-27 11:48:06] [42601] ERROR: syntax error at end of input</p>
  
  <p>Can anyone help?</p>