Re: DBI, savepoints, transactions, and AutoCommit - Mailing list pgsql-novice

From Daniel Staal
Subject Re: DBI, savepoints, transactions, and AutoCommit
Date
Msg-id 3D1BB8560FFF5D7C4B9682FF@mac-pro.magehandbook.com
Whole thread Raw
In response to DBI, savepoints, transactions, and AutoCommit  (felix@crowfix.com)
Responses Re: DBI, savepoints, transactions, and AutoCommit
Re: DBI, savepoints, transactions, and AutoCommit -- NOT A BUG
List pgsql-novice
--As of November 2, 2011 1:14:40 PM -0700, felix@crowfix.com is alleged to
have said:

> I understand the concepts of savepoints, and I have played with them
> in psql enough to understand that yes, as the fine manual says, they
> must be inside a transaction to work.  But how does this relate to DBI
> and DBD::Pg with AutoCommit off?  I learned the slow way that if
> AutoCommit is disabled, you don't issue a BEGIN WORK because that
> looks like trying to start a transaction inside a transaction.  But I
> I have AutoCommit off and try SAVEPOINT xyzzy, it tells me savepoints
> must be inside a transaction.  And of course, I can't get inside a
> transaction because I can't issue a BEGIN WORK because I am already
> inside a transaction.

--As for the rest, it is mine.

Sounds like you are doing things right.  What versions of the following are
you using?
DBI
DBD::Pg
Postgres

Also, do you have any example code that shows the problem?

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

pgsql-novice by date:

Previous
From: felix@crowfix.com
Date:
Subject: DBI, savepoints, transactions, and AutoCommit
Next
From: felix@crowfix.com
Date:
Subject: Re: DBI, savepoints, transactions, and AutoCommit