From: Sean C. <se...@ch...> - 2002-10-09 10:37:12
|
The attached patch fixes the autocommit functionality for Pg.rb. In 7.2.3 the AUTOCOMMIT tunable was removed and you can only use BEGIN/ROLLBACK now. This is a pretty important fix, IMHO as all of my scripts that use autocommit are failing without it. After thinking about this some, I think having the library keep some kind of track as to whether or not you're in a transaction is a good idea. A few use cases: *) If you're in a transaction and set dbh['AutoCommit'] to true, DBD::Pg will issue a BEGIN, all you get is a warning: no harm done. *) If you're in a transaction and set dbh['AutoCommit'] to false, then you've got a problem. Do you roll back, commit, or, do you issue a warning and do nothing? I'm a fan of the latter, however this can only be done if the library is keeping track of the state. Thoughts? This patch doesn't address the above concerns, but it does get things to a usable state again. -sc -- Sean Chittenden |