DBI, savepoints, transactions, and AutoCommit
От | felix@crowfix.com |
---|---|
Тема | DBI, savepoints, transactions, and AutoCommit |
Дата | |
Msg-id | 20111102201440.GF5551@crowfix.com обсуждение исходный текст |
Ответы |
Re: DBI, savepoints, transactions, and AutoCommit
|
Список | pgsql-novice |
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. Is this a case of what's sauce for the goose not being sauce for the gander? How do I use savepoints in DBI/DBD::Pg without enabling AutoCommit? Do I turn AutoCommit on, BEGIN WORK, SAVEPOINT xyzzy, and disable AutoCommit again? That sure doesn't sound reasonable. (I also have tis problem with SQLite, so I suspect it's a brain failure on my part rather than the rest of the world conspiring to confuse me, which isn't even very hard to do.) -- ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._. Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933 I've found a solution to Fermat's Last Theorem but I see I've run out of room o
В списке pgsql-novice по дате отправления: