autocommit bug?
"John Payne" <[email protected]> Fri, 1 Apr 2011 17:02:12 -0700
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <002601cbf0c9$38b882a0$aa2987e0$@edu> |
Hi,
I'm using DBD::Pg to access a PostgreSQL database with a Perl script, and
having trouble with AutoCommit: the standard syntax fails to set it. I have
tried both setting it during the connection:
my $dbh = DBI->connect ( 'DBI:Pg:dbname=' . $dbname, $dbuser,
$passwd,{AutoCommit => 0, RaiseError => 1});
.and setting it after the connection is made:
$dbh->{Autocommit} = 0;
Neither seems to work, because I get an error message when I try the
$dbh->begin_work() command, and when I check the value of the flag by
typing:
print $dbh->{AutoCommit}, it returns 1, even immediately after
setting it. I've tried disconnecting and reconnecting, without luck.
Can you suggest anything?
Thanks,
John