Re: do I need a rollback() after commit that fails?

Поиск
Список
Период
Сортировка
Искать
От
Alban Hertroys
Тема
Re: do I need a rollback() after commit that fails?
Дата
Msg-id
8D097E1C-0720-413A-866A-929B099D204D@solfertje.student.utwente.nl
Ответ на
Список
Дерево обсуждения
do I need a rollback() after commit that fails? Vick Khera <vivek@khera.org>
Re: do I need a rollback() after commit that fails? APseudoUtopia <apseudoutopia@gmail.com>
Re: do I need a rollback() after commit that fails? Andy Colson <andy@squeakycode.net>
Re: do I need a rollback() after commit that fails? Vick Khera <vivek@khera.org>
Re: do I need a rollback() after commit that fails? Alban Hertroys <dalroi@solfertje.student.utwente.nl>
On 30 Sep 2009, at 4:01, Vick Khera wrote:

> The question still stands: if the COMMIT fails, ROLLBACK is not
> required in Postgres.  Is this portable to other databases?


I don't think so. I recall messages on this list claiming that some  
databases (MS SQL, MySQL if memory serves me) commit the queries up to  
the failed query anyway if you issue a COMMIT (which is just wrong!),  
so the commit succeeds and there's nothing to rollback after that.  
Some searching should turn up those messages, if I recall correctly  
the issue at hand was that people expected that behaviour in Postgres  
too.

But I don't know what Perl DBI does internally when issuing $dbh- 
 >commit(), maybe it's taking such things into account already.

Alban Hertroys

--
Screwing up is the best way to attach something to the ceiling.


!DSPAM:737,4ac356da11681178911724!


В списке pgsql-general по дате отправления
От: Bill Moran
Дата:
От: Thomas Jacob
Дата:
FAQ