proposal: give savepoints automatic roll up ability.
От | Merlin Moncure |
---|---|
Тема | proposal: give savepoints automatic roll up ability. |
Дата | |
Msg-id | 6EE64EF3AB31D5448D0007DD34EEB3417DD056@Herge.rcsinc.local обсуждение исходный текст |
Список | pgsql-hackers |
Dear Hackers, In the early days of savepoints (then nested transactions), it was possible to push and pop sub-transactions in a kind of FIFO stack. While the savepoint method certainly has its advantages, there are some things I really miss about the old behavior, mostly because you had finer grained control over failure behavior without resorting to client side logic. What about extending one of the current commands or adding a new command that does the following: If not in a transaction containing a savepoint, issue a warning or an error. If in a failed transaction containing a savepoint, rollback to the specified (or last savepoint). If in a valid transaction containing a savepoint, do a no-op. esp=# begin; BEGIN esp=# savepoint x; SAVEPOINT esp=# foo; ERROR: syntax error at or near "foo" at character 1 LINE 1: foo; ^ esp=# release x with rollback; RELEASE esp=# commit; COMMIT; <-- not rollack esp=# ok. maybe this is another zany idea. but I really think it would be useful for things like scripts under certain circumstances. Merlin
В списке pgsql-hackers по дате отправления: