I am trying to convert my MySQL procedure to pgSQL function that uses rollback and commit. When I did I am getting an error like below,
ERROR: cannot begin/end transactions in PL/pgSQL HINT: Use a BEGIN block with an EXCEPTION clause instead. CONTEXT: PL/pgSQL function fun_profile_update(refcursor,character varying,character varying) line 155 at SQL statement
Please help me out. Here is my function: