Re: [SQL] A transaction in transaction? Possible?

2004-11-13 Thread Bricklen
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 ///*/

Re: [SQL] A transaction in transaction? Possible?

2004-11-11 Thread Gaetano Mendola
Stefan Weiss wrote: On Wednesday, 10 November 2004 18:28, Tom Lane wrote: Achilleus Mantzios [EMAIL PROTECTED] writes: Just a very naive thought Wouldn't make more sense to allow nested begin/commit/rollback blocks? We actually had it working that way initially, but changed to the

Re: [SQL] A transaction in transaction? Possible?

2004-11-11 Thread Gaetano Mendola
Achilleus Mantzios wrote: O Michael Fuhr Nov 10, 2004 : On Wed, Nov 10, 2004 at 12:45:19AM -0800, Riccardo G. Facchini wrote: Sorry, but I understand that your example is not really about nested transactions, but about sequential transactions. Here's a more elaborate example. If this doesn't

Re: [SQL] A transaction in transaction? Possible?

2004-11-11 Thread Stefan Weiss
On Thursday, 11 November 2004 09:23, Gaetano Mendola wrote: Stefan Weiss wrote: These tables are connected by foreign keys, but without on delete triggers. Why without ? Are you looking to solve a problem introduced by yourself ? There are numerous checks involved before a customer (or a

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Riccardo G. Facchini
Sorry, but I understand that your example is not really about nested transactions, but about sequential transactions. so, the primary question remains: how to commit/rollback them ? --- Michael Fuhr __ wrote: On Wed, Nov 10, 2004 at 09:23:02AM +0300, sad wrote: On Tuesday 09 November 2004

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Michael Fuhr
On Wed, Nov 10, 2004 at 12:45:19AM -0800, Riccardo G. Facchini wrote: Sorry, but I understand that your example is not really about nested transactions, but about sequential transactions. Here's a more elaborate example. If this doesn't demonstrate the capability you're looking for, then

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Achilleus Mantzios
O Michael Fuhr Nov 10, 2004 : On Wed, Nov 10, 2004 at 12:45:19AM -0800, Riccardo G. Facchini wrote: Sorry, but I understand that your example is not really about nested transactions, but about sequential transactions. Here's a more elaborate example. If this doesn't demonstrate the

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Achilleus Mantzios
O Peter Eisentraut Nov 10, 2004 : Achilleus Mantzios wrote: Wouldn't make more sense to allow nested begin/commit/rollback blocks? Possibly. But that consideration would have been more relevant about 6 years ago when they wrote the SAVEPOINT syntax into the SQL standard. :) In

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Peter Eisentraut
Achilleus Mantzios wrote: Wouldn't make more sense to allow nested begin/commit/rollback blocks? Possibly. But that consideration would have been more relevant about 6 years ago when they wrote the SAVEPOINT syntax into the SQL standard. :) -- Peter Eisentraut

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Peter Eisentraut
Achilleus Mantzios wrote: In other words, now with savepoints, BEGIN; COMMIT; ROLLBACK; can be replaced with SAVEPOINT foo; RELEASE foo; ROLLBACK TO foo; respectively. If only transactions weren't a requirement for SAVEPOINTs, what would we then need BEGIN; COMMIT; ROLLBACK; for? Note that

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Stefan Weiss
On Wednesday, 10 November 2004 18:28, Tom Lane wrote: Achilleus Mantzios [EMAIL PROTECTED] writes: Just a very naive thought Wouldn't make more sense to allow nested begin/commit/rollback blocks? We actually had it working that way initially, but changed to the spec-defined behavior,

[SQL] A transaction in transaction? Possible?

2004-11-09 Thread Andrei Bintintan
Is it possible to have another transatction in a transaction??? In the following example the lastROLLBACK is totally ignored(transaction1). //connect to database$database = dbConnect($dbhost, $dbuser, $dbpass, $dbname);dbExec($database, "BEGIN"); //transaction1//* dbExec($database,

Re: [SQL] A transaction in transaction? Possible?

2004-11-09 Thread Michael Fuhr
On Tue, Nov 09, 2004 at 10:47:06AM +0200, Andrei Bintintan wrote: Is it possible to have another transatction in a transaction??? PostgreSQL 8.0 (currently in beta) has savepoints, so you'll be able to do this: BEGIN; UPDATE orders SET technikernotiz='51' WHERE id=16143; SAVEPOINT foo; UPDATE

Re: [SQL] A transaction in transaction? Possible?

2004-11-09 Thread Theodore Petrosky
I thought nested transactions are available in the new release (8) coming up. Ted --- Andrei Bintintan [EMAIL PROTECTED] wrote: Is it possible to have another transatction in a transaction??? In the following example the last ROLLBACK is totally ignored(transaction1). //connect to

Re: [SQL] A transaction in transaction? Possible?

2004-11-09 Thread sad
On Tuesday 09 November 2004 18:24, Theodore Petrosky wrote: I thought nested transactions are available in the new release (8) coming up. how to commit/rollback them ? ---(end of broadcast)--- TIP 7: don't forget to increase your free space map