> I am very much a self taught sql programmer, and I only use it for a
> few small projects at home. Work requires just a bit of db work on my
> part, there are others who do the heavy lifting :-)
>
> I was surprised when one of my heavy lifting co-workers told me that
> when a transaction is begun, if the client disconnects (program bug,
> computer crash, whatever) without doing an explicit commit or
> rollback, the default in both Oracle and Sybase, and probably in every
> SQL database, is to commit. This seems completely backwards to me.
> For instance, the example from Practical SQL Handbok of transferring
> money from one account to another, you sure don't want any changes at
> all if the client disconnects after having subtracted money from one
> account but before having added that same amount to the second
> account.
>
> Could someone enlighten me here? He seemed absolutely positive that
> a disconnect is as good as a commit and always has been.
Disconnect should abort the transaction. It does in PostgreSQL, and I
_hope_ every other database.
--
Bruce Momjian | http://www.op.net/~candle
[EMAIL PROTECTED] | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026