Re: Does Postgres rollback transactions on all errors?
От
Eric Naujock
Тема
Re: Does Postgres rollback transactions on all
errors?
Дата
Msg-id
sae33205.048@gw5.abacusii.com
Список
Yes postgress does do rollbacks but you have to wrap your actions to make them work. You have to end your actions with either a commit or rollback. That will make the tranaction finish as you would expect. The commit command is covered on page 127 of the manual and rollback is on 253. It may just take a bit of experimentation to get it to behave right. >>> Tom Lane 04/22/01 05:56PM >>> Ryan Ho writes: > In a transaction, should any of the sql statements fail to execute, does Postgres rollback all the previous statements? Yes. > 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. Hard to believe. Can you provide some evidence? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
В списке pgsql-novice по дате отправления