Does Postgres always automatically rollback transactions when an SQL command fails? - Mailing list pgsql-novice

From Ryan Ho
Subject Does Postgres always automatically rollback transactions when an SQL command fails?
Date
Msg-id 3AE30BD9.A87DF57B@pacific.net.sg
Whole thread Raw
In response to Question re how to secure a postgresql 7.1 installation.  ("Eric Naujock " <naujocke@abacusii.com>)
List 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,
whilethe 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




pgsql-novice by date:

Previous
From: Ryan Ho
Date:
Subject: Re: BLOB Type ?
Next
From: Ryan Ho
Date:
Subject: Re: BLOB Type ?