TRANSACTION "WARNINGS" - Mailing list pgsql-hackers

From jose soares
Subject TRANSACTION "WARNINGS"
Date
Msg-id 3844FE1A.9E48AF93@sferacarta.com
Whole thread Raw
In response to Re: [QUESTIONS] errors on transactions and locks ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Hi all,

I have again a problem about TRANSACTIONS.
I had some answers about this matter some time ago, but unfortunately the solution wasn't yet found.
Transaction are essentials for a relational database but in the case of PostgreSQL some times it's
impossible
to use them. Right now I'm in a middle of a work and I need to use transactions but I can't go on because
there are some "warnings" that I would like to avoid but I can't.


Problem:
   PostgreSQL automatically ABORTS at every error, even a syntax error.   I know that a transaction is a sequence of
operationswhich either all succeed, or all fail, and   this behavior is correct for batch mode operations,  but  it is
notuseful in interactive mode where
 
the user   could decide if the transaction should be COMMITed or ROLLBACKed even in presence of  errors.   Other
databaseshave such behavior.
 

What about to have a variable to set like:

SET TRANSACTION MODE TO {BATCH | INTERACTIVE}

where:       BATCH:              the transaction ROLLBACK at first error and COMMIT only if all operations
succeed.       INTERACTIVE:  leaves the final decision to user to COMMIT or ROLLBACK even if some error occurred.


Comments...

Jose'




pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Next
From: Hiroshi Inoue
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions