Re: Rollback on Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Paesold" <mpaesold(at)gmx(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rollback on Error
Date: 2004-09-14 14:26:19
Message-ID: 6959.1095171979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> I though the postgres behaviour of rolling back the whole transaction was
> standard?

Not really.

> If that is not the case, I don't understand why core seems to be
> against a mode (GUC), where an implicit savepoint is generated before each
> statement so that "rollback of the last statement" would be possible.

Because we learned our lesson with the ill-fated autocommit GUC
variable. You can't have fundamental transactional semantics depending
on the phase of the moon, but from the point of view of application
code, anything that can be flipped as easily as a GUC variable is an
unknown.

If you've been following recent -hackers discussions you will also
realize that a forced savepoint for every statement is untenable
from a performance perspective anyway.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Bjorklund 2004-09-14 14:52:37 Re: PG case sensitivity
Previous Message Stephan Szabo 2004-09-14 14:19:17 Re: PG case sensitivity

Browse pgsql-hackers by date

  From Date Subject
Next Message strk 2004-09-14 14:27:37 Re: pg_restore segfault with pg-CVS
Previous Message Tom Lane 2004-09-14 14:19:33 Re: pg_dump as a bunch of PostgreSQL functions