Re: savepoint improvements

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: savepoint improvements
Дата
Msg-id 20070122183354.GE29762@svana.org
обсуждение исходный текст
Ответ на Re: savepoint improvements  ("Merlin Moncure" <mmoncure@gmail.com>)
Ответы Re: savepoint improvements  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-hackers
On Mon, Jan 22, 2007 at 11:21:12AM -0500, Merlin Moncure wrote:
> >\begin_nest
> >\commit_nest
> >\rollback_nest
>
> That would work if we could rollback conditionally on failure (like
> on_error_rollback but with definable beginning and ending points).  I

Sorry, "rollback conditionally on failure" isn't parsing for me. Can
you give some example of what you mean?

> still think we are hacking around limitations of savepoints but it
> would solve the scripting problem at least.  A general implementation
> on the server would benefit everybody.

I don't understand this either. Everything you can do with nested
transactions you can also do with savepoints, so I'm really not
understand what the limitations are?

Actually, looking at the savepoint documentation, it looks like there
is no way to say:

if transaction_state ok then release X
else rollback to X

Which is what a normal COMMIT does (sort of). This is very irritating
for scripting, so maybe a "COMMIT TO X" command would be auseful
addition?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Autovacuum Improvements
Следующее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: savepoint improvements