From: | "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> |
---|---|
To: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Nested Transactions, Abort All |
Date: | 2004-07-09 10:09:16 |
Message-ID: | 46C15C39FEB2C44BA555E356FBCD6FA40184D13E@m0114.s-mxs.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 x
INSERT INTO ...;
SAVEPOINT x;
INSERT INTO ...;
COMMIT;
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2004-07-09 10:45:04 | Re: Nested Transactions, Abort All |
Previous Message | Zeugswetter Andreas SB SD | 2004-07-09 09:58:42 | Re: Nested Transactions, Abort All |