Does Postgres rollback transactions on all errors?
Ryan Ho <ryanho@cyberronins.com>
From: Ryan Ho <ryanho@cyberronins.com>
To:
Cc: "<Postgres Novice" <pgsql-novice@postgresql.org>
Date: 2001-04-22T16:00:11Z
Lists: pgsql-novice
In a transaction, should any of the sql statements fail to execute, does Postgres rollback all the previous statements? To my best knowledge, it should but I have observed that on some occasions, half my transaction can get committed, while the other half is unsuccessful. Do I need check for failed transactions and enforce a rollback in my code or is it done by the backend automatically? Thanks in advance Ryan