From: | DUPREZ Cédric <cedric(dot)duprez(at)ifn(dot)fr> |
---|---|
To: | <pgadmin-support(at)postgresql(dot)org> |
Subject: | Savepoints in PgAdmin |
Date: | 2009-08-20 14:16:07 |
Message-ID: | 5E3D22A4869BB94AA1138AB97660D8B601969A42@POPULUS.ifn.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hi,
I am using PgAdmin 1.10.0 with Postgresql 8.3.7 on Windows XP Pro (SP3).
The problem I am facing deals with savepoint and rollback management in PgAdmin.
I initiate a transaction, then I run different queries, create a savepoint :
begin;
CREATE temp TABLE toto (id int);
INSERT INTO toto VALUES (1);
SAVEPOINT my_save;
Then, I execute a wrong query :
SELECT * FROM tot;
I get an error message :
ERROR: relation "toto" does not exist
********** Erreur **********
ERROR: relation "toto" does not exist
État SQL :42P01
But I can't rollback to my savepoint, because a complete rollback has already been executed by PgAdmin :
rollback TO my_save;
ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks
********** Erreur **********
ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks
État SQL :25P01
This problem seems to come from the fact that PgAdmin executes code in a single transaction statement...
How is it possible to create different transaction statements within PgAdmin, in order to use savepoints ?
Thanks in advance for your help.
Regards,
C. Duprez
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2009-08-20 15:39:24 | Re: sudden program termination: no warning, error, or crash |
Previous Message | JwexlerAt MailDotCom | 2009-08-19 23:41:16 | Re: sudden program termination: no warning, error, or crash |