Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D13E@m0114.s-mxs.net
обсуждение исходный текст
Ответ на Nested Transactions, Abort All  (Thomas Swan <tswan@idigx.com>)
Список pgsql-hackers
> As far as implementing only savepoints, look at this:
>
> BEGIN;
>     BEGIN;
>     INSERT INTO ...;
>     COMMIT;
>     BEGIN;
>     INSERT INTO ...;
>     COMMIT;
>     BEGIN;
>     INSERT INTO ...;
>     COMMIT;
>
> With savepoints, it looks pretty strange:
>
> BEGIN;
>     SAVEPOINT x1;
>     INSERT INTO ...;
>     SAVEPOINT x2;

If you meant same as your nested example, it would be:

BEGIN TRANSACTION;SAVEPOINT x;INSERT INTO ...;SAVEPOINT x;    -- this implicitly commits previous subtxn xINSERT INTO
...;SAVEPOINTx;INSERT INTO ...; 
COMMIT;

Andreas


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

Предыдущее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: Nested Transactions, Abort All
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: Nested Transactions, Abort All