- #my $dbh = DBI->connect_cached("dbi:Pg:service=ndawn","", "", {AutoCommit => 1});
- {
- no warnings;
- local $dbh->{Warn} = 0;
- $dbh->do('ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT; DEALLOCATE ALL');
- }
+ #my $dbh = DBI->connect_cached("dbi:Pg:service=ndawn","", "", {AutoCommit => 0, RaiseError => 1, pg_enable_utf8 => 1});
+ $dbh->rollback;
+ #Need to set autocommit after, to be able to rollback old incomplete transactions.
+ $dbh->{AutoCommit} = 1;