Re: A transaction in transaction? Possible?

From: Bricklen <bricklen(at)zyahoo(dot)zcomz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: A transaction in transaction? Possible?
Date: 2004-11-09 16:20:11
Message-ID: %66kd.134544$df2.123001@edtnps89
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Franco Bruno Borghesi 2004-11-09 16:53:01 Re: Simple SQL Question
Previous Message Goutam Paruchuri 2004-11-09 15:34:42 Loading text data/binary data !!