From: Michael N. <uu...@rz...> - 2002-09-18 19:28:24
|
Sean Chittenden wrote: > > > > > Have you tried the following? > > > > > > > > > > dbh['AutoCommit'] = false > > > > > > > > > > If this was set to false, no commit should be issued automatically! > > > > Maybe, I've found a solution. > > > > A new version of Pg.rb is appended. I cannot test it this week, so perhaps could you? > > > > I've thrown out the whole in_transaction/start_transaction stuff, and > > replaced it with a simple "SET AUTOCOMMIT TO ON|OFF" statement. > > I hope this works correctly. > > This looks and acts worlds better, thank you! One quick suggestion > given that 7.3's in beta right now. In 7.3 you can turn off > autocommit for the entire database on the backend with a new tunable > 'autocommit = false' which forces the user to begin/commit. On line > 105 of Pg.rb, you're forcing autocommit on by default. Could you > delete that line and just leave it up to the DBA who configured the > machine? I can't think of a reason why it'd be worth while to send > the extra autocommits to the server. -sc The reason was to stay compatible with the old Pg.rb one. But I guess, good code explicitly sets AutoCommit, so that we can remove this line. Regards, Michael |