Search Postgresql Archives

Re: do I need a rollback() after commit that fails?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 29, 2009 at 3:56 PM, Andy Colson <andy@xxxxxxxxxxxxxxx> 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?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux