Re: transaction processing after error in statement - Mailing list pgsql-sql

From Rod Taylor
Subject Re: transaction processing after error in statement
Date
Msg-id 1068490585.25089.7.camel@jester
Whole thread Raw
In response to Re: transaction processing after error in statement  (Holger Jakobs <holger@jakobs.com>)
Responses Re: transaction processing after error in statement  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-sql
> be recovered either. When committing a transaction the effects of all
> operations that did not fail will be made permanent. This is how
> transaction processing is described in the literature.

I would be interested in reading that (URLs please) as I didn't see
anything in the spec that was interesting on this topic.

4.8.5 from Framework (part 01)       An SQL-transaction (transaction) is a sequence of executions of
SQL-statementsthat is atomic with respect to recovery. That is       to say: either the execution result is completely
successful,or       it has no effect on any SQL-schemas or SQL-data.
 

The "execution result is completely successful" could certainly be used
to back up PostgreSQLs choice to force a rollback. However, it doesn't
differentiate between execution of what the user requested, and
execution of recovery procedures on the successful user elements.

Irregardless, I wish a commit on a failed transaction would throw an
error -- END is good enough for Rollback or Commit.

For PostgreSQL to implement this we need Savepoints or nested
transactions internally since in many cases data is physically written
in order to perform things like Foreign Key constraint checks.



pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: transaction processing after error in statement
Next
From: Gaetano Mendola
Date:
Subject: Re: Dynamic Query for System functions - now()