On 3/25/06 6:24 PM, John Siracusa wrote:
I expect the following two pieces of code to give the same result. One is
SQL, fed directly to Postgres using the psql command-line tool, and the
other is Perl code using DBI. Before I file this as a bug in DBD::Pg, I
want to make sure it's not a
John,
I've never used Postgres under Perl but that:
dbdpg: Warning: invalid done_begin turned off
- rollback= 1 at new.pl line 38
looked suspicious. From the Postgres code:
if (PQTRANS_IDLE == tstatus) { /* Not in a transact
if (imp_dbh-done_begin) {
You need to turn AutoCommit off with:
my $dbh = DBI-connect('dbi:Pg:dbname=test', 'postgres', '...',
{ PrintError = 1, RaiseError = 0,
AutoCommit = 0 });
--
-- Tom Mornini
On Mar 25, 2006, at 3:24 PM, John Siracusa wrote:
I expect the following two pieces of
Tom Mornini wrote:
You need to turn AutoCommit off with:
my $dbh = DBI-connect('dbi:Pg:dbname=test', 'postgres', '...',
{ PrintError = 1, RaiseError = 0,
AutoCommit = 0 });
You should not have to turn autocommit off with begin_work:
From the docs:
Enable
On 3/26/06 4:00 AM, Martin J. Evans wrote:
Tom Mornini wrote:
You need to turn AutoCommit off with:
my $dbh = DBI-connect('dbi:Pg:dbname=test', 'postgres', '...',
{ PrintError = 1, RaiseError = 0,
AutoCommit = 0 });
You should not have to turn autocommit