Re: transaction processing after error in statement

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: JanWieck(at)Yahoo(dot)com
Cc: 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 06:57:33
Message-ID: 200311110658.hAB6wFJ25120@bg.bib.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> Why is that "funny behaviour" for you? By putting the statements into
> a transaction block you told the data management system "I want this
> group of statements to be atomic". Atomic means all or nothing. It
> might not be exactly what you intended to say, and you have a point
> if you conclude that PostgreSQL is limited because it doesn't let you
> say anything in between all or nothing. But after all, thus far it is
> only doing what you asked for.
>

It is "funny behaviour", because I expect those operations of the
transaction, which executed successfully, to be performed in an atomic
way. It is obvious that I cannot expect an operation which reported an
error to have any effect.

"Atomic" means that all operations (whether successful or not) will be
carried out all together or none of them - but only the successful ones
will have had an effect.

Again: Why not make a difference between "commit" and "rollback" in a
transaction in this case? Why not let the user decide which parts should
be commited? The practical reason is that programming would become a lot
more convenient. (if there is a practical reason it does not necessarily
need a technical reason, I believe.)

Sincerely,

Holger

--
Holger(at)Jakobs(dot)com, Bergisch Gladbach, Germany
Telefon (0 22 02) 5 99 91 oder (01 77) 7 92 24 66

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-11-11 09:58:51 Re: How to know column constraints via system catalog tables
Previous Message Bruce Momjian 2003-11-11 05:13:03 Re: pg 7.4.rc1, Range query performance