I looking for solution for commit, rollback with in function.

Below is Example function


CREATE OR REPLACE FUNCTION test()
  RETURNS void AS
$BODY$
BEGIN
--- set    of statements

Commit;

-- set of statement
commit;

-- if things goes wrong
rollback


RETURN;
END; $BODY$
  LANGUAGE 'plpgsql';


Thanks in advance .

Regards
Ravi Katkar




Reply via email to