Re: Does psql use nested transactions?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Does psql use nested transactions?
Date: 2004-08-17 18:44:18
Message-ID: 200408171844.i7HIiIw08773@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-17 18:56:19 Re: Does psql use nested transactions?
Previous Message Tom Lane 2004-08-17 18:42:53 Re: Does psql use nested transactions?