> 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