Re: Transaction aborts on syntax error. - Mailing list pgsql-hackers

From ramirez@idconcepts.org (Edwin S. Ramirez)
Subject Re: Transaction aborts on syntax error.
Date
Msg-id 8d9c3e20.0402121401.18a85749@posting.google.com
Whole thread Raw
In response to Re: Transaction aborts on syntax error.  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
> Oh, yea, that would be bad.  So you want to invalidate the entire
> session on any error?  That could be done.
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001

Well, that's exactly the current behaviour, which creates certain
problems during interactive or programatic operation.  Tom Lane,
described an excellent compromise to the problem, using "nested
transactions".  libpg should be configurable to automatically start a
nested transaction for each statement within a transaction allowing
the outer transaction to continue in case of error.  The error would
be communicated to the client in the normal manner.

This would not be the default since existing applications rely on the
entire transaction aborting.

-ESR-


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: How can I have 2 completely seperated databases in
Next
From: Jason Essington
Date:
Subject: Cannot read block error.