Re: How to implement nested transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to implement nested transactions
Date: 2006-01-26 19:14:39
Message-ID: 23441.1138302879@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-01-26 19:16:54 Re: Arrays
Previous Message Oisin Glynn 2006-01-26 19:10:45 VACUUM Question