[Ur] Exceptions handling
Vladimir Shabanov
vshabanoff at gmail.com
Mon Sep 6 07:51:20 EDT 2010
2010/9/6 Adam Chlipala <adamc at impredicative.com>:
> Vladimir Shabanov wrote:
>> I think it would be nice to have possibility to manually restart
>> transaction so DB still can be accessed after error.
>>
>
> After I sent the above message, I realized that some kind of compensating
> action was necessary to make this feature at all useful for Postgres.
> Otherwise, a transaction wouldn't be able to commit after an error, so any
> actions an application had taken in response to the error would be rolled
> back. Because of this, I'm planning to add a savepoint before every piece
> of DML executed by the new function.
So savepoint will be introduced only where it really needed (dml with
user error handling)? I think that this is the best solution.
BTW it can be useful to have function for cancelling (and maybe
restarting) transaction as a part of error handling.
More information about the Ur
mailing list