pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Bintintan <klodoma@ar-sd.net>
To: pgsql-sql@postgresql.org
Subject: A transaction in transaction? Possible?
Date: Tue, 9 Nov 2004 10:47:06 +0200
Message-ID: <014301c4c638$b33af430$0b00a8c0@forge> (raw)

Is it possible to have another transatction in a transaction??? In the following example the last ROLLBACK is totally ignored(transaction1). 

//connect to database
$database = dbConnect($dbhost, $dbuser, $dbpass, $dbname);
dbExec($database, "BEGIN"); //transaction1

//*
        dbExec($database, "BEGIN");//transaction2
            $sql = "UPDATE orders SET technikernotiz='51' WHERE id=16143";
            dbExec($database, $sql);
        dbExec($database, "COMMIT");//transaction2
/**/

    $sql = "UPDATE orders SET reklamationsdetail='51' WHERE id=16143";
    dbExec($database, $sql);
dbExec($database, "ROLLBACK");//transaction1

dbClose($database);

view thread (18+ messages)  latest in thread

Message-ID: <014301c4c638$b33af430$0b00a8c0@forge>
Permalink:  ../014301c4c638$b33af430$0b00a8c0@forge/
Also on:    postgresql.org/message-id/014301c4c638$b33af430$0b00a8c0@forge

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: klodoma@ar-sd.net
  Subject: Re: A transaction in transaction? Possible?
  In-Reply-To: <014301c4c638$b33af430$0b00a8c0@forge>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox