Re: transaction processing after error in statement

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: Holger Jakobs <holger(at)jakobs(dot)com>, sszabo(at)megazone(dot)bigpanda(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: transaction processing after error in statement
Date: 2003-11-11 19:20:14
Message-ID: 3FB1366E.9030805@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Rod Taylor wrote:<br>
<blockquote type="cite" cite="mid1068490585(dot)25089(dot)7(dot)camel(at)jester">
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap=""><!---->
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-statements that 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.</pre>
</blockquote>
Although i am not aware of the roots of this discussion but would like
to<br>
comment at this point .<br>
<br>
When we work with sequences an aborted transaction does have<br>
a permanent effect on the last value&nbsp; of sequence. Is this behaviour <br>
not a violation of above defination of transaction ?<br>
<br>
<br>
Regds<br>
Mallah.<br>
<br>
<blockquote type="cite" cite="mid1068490585(dot)25089(dot)7(dot)camel(at)jester">
<pre wrap="">

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.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/faqs/FAQ.html">http://www.postgresql.org/docs/faqs/FAQ.html</a>
</pre>
</blockquote>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.3 KB

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Nick Fankhauser 2003-11-11 21:23:02 Re: Is there a more elegant way to write this query?...
Previous Message Yasir Malik 2003-11-11 17:33:20 Bit strings