Search Postgresql Archives

Transaction with in function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

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

 

 

 

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux