Re: do I need a rollback() after commit that fails? - Mailing list pgsql-general

From Vick Khera
Subject Re: do I need a rollback() after commit that fails?
Date
Msg-id 2968dfd60909291901y53971e23nde72847742590004@mail.gmail.com
Whole thread Raw
In response to Re: do I need a rollback() after commit that fails?  (Andy Colson <andy@squeakycode.net>)
Responses Re: do I need a rollback() after commit that fails?
List pgsql-general
On Tue, Sep 29, 2009 at 3:56 PM, Andy Colson <andy@squeakycode.net> wrote:
> Unless I'm mistaken, if AutoCommit is enabled, then each statement will be
> commit for you.  The commit() and the rollback() are both useless.
>

To clarify, the DBI driver turns off AutoCommit in postgres when
begin_work() is called.  It does not however disable its internal
AutoCommit flag.

The question still stands: if the COMMIT fails, ROLLBACK is not
required in Postgres.  Is this portable to other databases?

pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: query is taking longer time after a while
Next
From: Scott Marlowe
Date:
Subject: Re: query is taking longer time after a while