Обсуждение: [pgAdmin III] #47: Savepoints in PgAdmin
#47: Savepoints in PgAdmin
---------------------------+------------------------------------------------
Reporter: Cédric DUPREZ | Owner: dpage
Type: bug | Status: new
Priority: minor | Milestone: 1.10.1
Component: pgadmin | Version: 1.8
Keywords: querytool | Platform: all
---------------------------+------------------------------------------------
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.
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/47>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#47: Savepoints in PgAdmin
---------------------------+------------------------------------------------
Reporter: Cédric DUPREZ | Owner: dpage
Type: bug | Status: new
Priority: minor | Milestone: 1.10.1
Component: pgadmin | Version: 1.8
Keywords: querytool | Platform: all
---------------------------+------------------------------------------------
Comment(by gleu):
If it fails, pgAdmin automatically does a ROLLBACK. In the
frmQuery::completeQuery() method, there is this code:
// If the transaction aborted for some reason, issue a rollback to
cleanup.
if (conn->GetTxStatus() == PGCONN_TXSTATUS_INERROR)
conn->ExecuteVoid(wxT("ROLLBACK;"));
We should perhaps have an option to enable/disable this behaviour
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/47#comment:1>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#47: Savepoints in PgAdmin
---------------------------+------------------------------------------------
Reporter: Cédric DUPREZ | Owner: gleu
Type: bug | Status: assigned
Priority: minor | Milestone: 1.10.1
Component: pgadmin | Version: 1.8
Keywords: querytool | Platform: all
---------------------------+------------------------------------------------
Changes (by gleu):
* owner: dpage => gleu
* status: new => assigned
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/47#comment:2>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#47: Savepoints in PgAdmin
---------------------------+------------------------------------------------
Reporter: Cédric DUPREZ | Owner: gleu
Type: feature | Status: assigned
Priority: minor | Milestone: 1.12
Component: pgadmin | Version: 1.8
Keywords: querytool | Platform: all
---------------------------+------------------------------------------------
Changes (by gleu):
* type: bug => feature
* milestone: 1.10.1 => 1.12
Comment:
It is 1.12 material since there's a new configuration option.
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/47#comment:3>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#47: Savepoints in PgAdmin
----------------------------+-----------------------------------------------
Reporter: Cédric DUPREZ | Owner: gleu
Type: feature | Status: closed
Priority: minor | Milestone: 1.12
Component: pgadmin | Version: 1.8
Resolution: fixed | Keywords: querytool
Platform: all |
----------------------------+-----------------------------------------------
Changes (by gleu):
* status: assigned => closed
* resolution: => fixed
Comment:
Fixed in r8031
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/47#comment:4>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III