On Friday 23 September 2011, Georges Racinet wrote:
> - Other ideas ?
savepoints!
test_bqi=> BEGIN;
test_bqi=> SAVEPOINT "foo";
SAVEPOINT
test_bqi=> SELECT * from error;
ERROR: relation "error" does not exist
LINE 1: SELECT * from error;
^
test_bqi=> SELECT * from error2;
ERROR: current transaction is aborted, commands ignored until end of
transaction block
test_bqi=> ROLLBACK TO SAVEPOINT "foo";
ROLLBACK
test_bqi=> SELECT * from res_users;
id | name | active | login ....
.....
They create a "nested" transaction in the sense that we can rollback to the
point before the validation error.
--
Say NO to spam and viruses. Stop using Microsoft Windows!
_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help : https://help.launchpad.net/ListHelp