Re: How should I end a transaction with possibly failed queries?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sergey Samokhin <prikrutil(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How should I end a transaction with possibly failed queries?
Date: 2009-09-02 20:01:31
Message-ID: 28187.1251921691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sergey Samokhin <prikrutil(at)gmail(dot)com> writes:
> Does it seem right to send "COMMIT" without checking whether any of
> the queries I've done in the transaction failed?

If anything failed, COMMIT is interpreted as ROLLBACK anyway.

Some other DBMSes might do this differently, but that's what PG does.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sergey Samokhin 2009-09-02 20:08:44 Re: How should I end a transaction with possibly failed queries?
Previous Message Ruzsinszky Attila 2009-09-02 19:38:44 Re: Modifying selected records