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

 

Reply via email to