Does Postgres rollback transactions on all errors?

From: Ryan Ho <ryanho(at)cyberronins(dot)com>
To:
Cc: "<Postgres Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Does Postgres rollback transactions on all errors?
Date: 2001-04-22 16:00:11
Message-ID: 3AE3000A.B6DB7FDD@cyberronins.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ryan Ho 2001-04-22 16:49:07 Re: BLOB Type ?
Previous Message Ryan Ho 2001-04-22 15:36:12 Re: BLOB Type ?