Re: Does psql use nested transactions? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Does psql use nested transactions?
Date
Msg-id 200408171844.i7HIiIw08773@candle.pha.pa.us
Whole thread Raw
In response to Re: Does psql use nested transactions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Does psql use nested transactions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Does psql use nested transactions?  ("Simon Riggs" <simon@2ndquadrant.com>)
Re: Does psql use nested transactions?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Added to TODO list:
> 
> > * Add an option to automatically use savepoints for each statement in a
> >   multi-statement transaction.
> 
> >   When enabled, this would allow errors in multi-statement transactions
> >   to be automatically ignored.
> 
> Note that whoever implements this had better be mindful of the bad
> experience we had with autocommit.  If there is any way that this
> behavior could be turned on underneath an application/script without
> the app knowing about it, this would be spectacularly dangerous.
> 
> Like I said, my preference would be that it couldn't be turned on at all
> except when psql's input is interactive.

Should we allow it only to be enabled inside a multi-statement
transaction, and it turns off when the transaction completes?

Doing it only for interactive mode seems too error-prone to me (it works
in psql, but not from my script).

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Haroldo Stenger
Date:
Subject: Re: Does psql use nested transactions?
Next
From: Tom Lane
Date:
Subject: Re: Does psql use nested transactions?