"Andrus" <eetasoft(at)online(dot)ee> writes:
> I want to implement nest transactions like
> begin;
> CREATE temp table t2 (foo char(20) primary key);
> begin;
> CREATE temp table t1 (bar char(20) primary key);
> commit;
> rollback;
That is not the correct syntax. Use SAVEPOINT, then ROLLBACK TO SAVEPOINT
or RELEASE SAVEPOINT.
regards, tom lane