title: Invalid transaction termination
body: <p>I have some procedure which when i execute in dbeaver works fine without issue, however when i call it from outside program i am getting error below. I do not want to copy/paste full procedure here because it's pretty big and it works in db tool. I just copy/paste top and bottom.  What could be the cause of it? </p>
  
  <p><strong>Procedure:</strong></p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE MyProcedure(lot of args..)
   LANGUAGE plpgsql
  AS $procedure$
  DECLARE
  .....
  .....
  COMMIT;
  END;
  $procedure$
  ;
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>ERROR: invalid transaction termination
    Where: PL/pgSQL function MyFunction line 185 at COMMIT  Call getNextException to see other errors in the batch. Line 185 at COMMIT  Call getNextException to see other errors in the batch.
  </code></pre>