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

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 (view raw or flat)
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

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-2014 The PostgreSQL Global Development Group