Search Postgresql Archives

Re: Autocommit off - commits/rollbacks

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

 



On Tuesday, March 29, 2011 4:35:04 am tushar nehete wrote:
> Yes We can use exception for each statement to restrict the rollback.
> But how we can use SAVEPOINT and rollback to SAVEPOINT
> in the stored function or procedure in POSTGRES?
> We can only use the savepoints in transactions but not in stored functions.
> 
> Regards,
> Tushar
> 

See below for how to achieve the same effect using EXCEPTIONS in pl/pgsql:

http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-
structures.html#PLPGSQL-ERROR-TRAPPING

-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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