apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <chr...@pearsoncmg.com>
Subject Re: Transaction modes, explicit rollbacks etc.
Date Tue, 02 May 2006 14:15:42 GMT
Bojan Smojver wrote:

> Actually, Oracle will commit even if there were errors. So, the  
> situation is that for PostgreSQL, resetting the transaction error code  
> is meaningless - the whole transaction will be rolled back eventually,  
> unless explicit savepoints are used. Other databases will happily  
> ignore the errors and commit whatever remains.

   I can confirm this, FWIW.

> Here is the part we can now do with IGNORE_ERRORS that we could not do  
> before - we can make PGSQL behave like other databases if we so wish.  
> By setting IGNORE_ERRORS, we can insert SAVEPOINTS before every  
> query/select inside PGSQL driver automatically (i.e. the caller  
> doesn't have to do it). If an error occurs withing query/select, we  
> simply roll back to the previous savepoint, keep trans->errnum always  
> at zero and return the error code of the actual query. The caller can  
> then decide what should be done with the whole thing. This brings us  
> in line with transactional behaviour other databases.
> 
> In summary, we can pick the behaviour we want and users get  
> savepoints/error recovery for free with PGSQL if they so wish.
> 
> Let me know what you think...

   This is sounding good to me!  I've promised I'll hustle up on
my httpd work so I apologize for my relative absence of help on
this thread, but by all means ping me privately if you want a hand.
Your focus on this set of problems is much appreciated, believe me.

Chris.

-- 
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B


Mime
View raw message