From: Sam Vilain on 25 May 2010 00:08 The note at the end of; http://www.postgresql.org/docs/8.4/static/sql-savepoint.html Lead us to believe that if you roll back to the same savepoint name twice in a row, that you might start walking back through the savepoints. I guess I missed the note on ROLLBACK TO SAVEPOINT that that is not how it works. Here is the section: SQL requires a savepoint to be destroyed automatically when another savepoint with the same name is established. In PostgreSQL, the old savepoint is kept, though only the more recent one will be used when rolling back or releasing. (Releasing the newer savepoint will cause the older one to again become accessible to ROLLBACK TO SAVEPOINT and RELEASE SAVEPOINT.) Otherwise, SAVEPOINT is fully SQL conforming. I think it could be improved by also communicating: Rollback to a savepoint never releases it; you can safely repeat ROLLBACK TO SAVEPOINT statements without unwinding the transaction, even if you are re-using savepoint names. Well, maybe no-one else will ever have the misconception I did, but there it is. Sam. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
|
Pages: 1 Prev: (9.1) btree_gist support for searching on "notequals" Next: ROLLBACK TO SAVEPOINT |