From: Bricklen <bricklen@zyahoo.zcomz>
To: pgsql-sql@postgresql.org
Subject: Re: A transaction in transaction? Possible?
Date: Tue, 09 Nov 2004 16:20:11 GMT
Message-ID: <%66kd.134544$df2.123001@edtnps89> (raw)
In-Reply-To: <014301c4c638$b33af430$0b00a8c0@forge>
References: <014301c4c638$b33af430$0b00a8c0@forge>
Andrei Bintintan wrote:
> //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);
>
>
This appears to be the same as Oracle's "autonomous transactions", fwiw.
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: bricklen@zyahoo.zcomz
Subject: Re: A transaction in transaction? Possible?
In-Reply-To: <%66kd.134544$df2.123001@edtnps89>
* 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