From: Markus S. <ma...@bl...> - 2006-10-06 10:56:18
|
Hi, Our patches were very similar, I like the single rollback() method with added support for savepoints. Adding a rollback_savepoint method (as I did) is not that elegant. I've modified my patch to support multiple savepoints. I'm now using the same methods as the original patch (i.e. savepoint, release and rollback) The original patch from [1] did release a savepoint if it already existed. I think that's dangerous. In fact, PostgreSQL even allows to define multiple savepoints with the very same name. Also, if you rollback to a savepoint, the savepoint is not released. So you can rollback to a savepoint several times. This also allows you to call rollback() and then release() on the same savepoint. If you define multiple savepoints A, B, C (in that order), rolling back to savepoint A obviously releases the savepoints B and C. My patch takes that into accont. Please note that savepoint A still remains and does not get released when rolling back to it. (I've tried to upload the page to the 'patches' page on SourceForge, but didn't succeed, I've only added a useless comment, sorry. Please bear with a SF-first-timer.) Regards Markus [1]: the original patch: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1511984&group_id=16528 Markus Schiltknecht wrote: > Hi, > > as I really urgently need savepoints, I have written a small patch to > add support for one savepoint. Only to find out that I should have > looked in the SF 'patches' page where someone else did exactly the same... > > I'm comparing our patches just now. > > Regards > > Markus |