Skip site navigation (1) Skip section navigation (2)

Re: Nested transactions

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Barry Lind <blind(at)xythos(dot)com>, simon(at)2ndquadrant(dot)com,Patches <pgsql-patches(at)postgresql(dot)org>, alvherre(at)dcc(dot)uchile(dot)cl
Subject: Re: Nested transactions
Date: 2004-06-17 02:01:32
Message-ID: 40D0FB7C.8030309@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-patches
> And consider this case:
> 
> 	BEGIN;
> 	...
> 	SAVEPOINT x;
> 	SELECT func_call();
> 	SELECT func_call();
> 	COMMIT;
> 
> Now if func_call has a savepoint, it is really nested because it can't
> know whether the savepoint X will be used to roll back, so its status is
> dependent on the status of X.  Now, if we used savepoints in func_call,
> what happens in the second function call when we define a savepoint with
> the same name?  I assume we overwrite the original, but using nested
> transaction syntax seems much clearer.  

It also seems in this example that func_call() probably shouldn't have 
permission to rollback to savepoint x?  Otherwise it would get...weird.

Chris


In response to

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-06-17 02:03:15
Subject: Re: Nested transactions
Previous:From: Alvaro HerreraDate: 2004-06-17 02:01:17
Subject: Re: Nested transactions

pgsql-jdbc by date

Next:From: Bruce MomjianDate: 2004-06-17 02:03:15
Subject: Re: Nested transactions
Previous:From: Alvaro HerreraDate: 2004-06-17 02:01:17
Subject: Re: Nested transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group