Skip site navigation (1) Skip section navigation (2)

Does Postgres rollback transactions on all errors?

From: Ryan Ho <ryanho(at)cyberronins(dot)com>
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: (view raw, whole thread or download thread mbox)
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

In response to


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group