Re: Continue transactions after errors in psql

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: Michael Paesold <mpaesold(at)gmx(dot)at>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Continue transactions after errors in psql
Date: 2005-04-25 17:17:49
Message-ID: 200504251717.j3PHHnw18163@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> "Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> > I do think so. In it's current state, would you yourself put \reseterror in
> > your .psqlrc? Or even an /etc/psqlrc?
> > It would break all my scripts that must either succeed or fail -- now they
> > will produce garbage in my databases when something goes wrong!
>
> This is sounding a whole lot like the concerns that prompted us to
> reject server-side autocommit a little while ago.
>
> The problem with rejiggering error-handling behavior is that you *will*
> break existing code, on a rather fundamental level, and it's not even
> obvious that it's broken until after things have gone badly wrong.
>
> I don't have a good solution, but I do think that you need to set things
> up so that an application or script must invoke the new behavior
> explicitly. Hidden defaults that silently change such behavior look
> like land mines waiting to be stepped on.

Right, this is off by default. We might be able to make it on by
default if we have it enabled only for interactive psql's. We need to
discuss this.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-04-25 17:19:21 Re: Continue transactions after errors in psql
Previous Message Bruce Momjian 2005-04-25 17:15:53 Re: Continue transactions after errors in psql

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-04-25 17:19:21 Re: Continue transactions after errors in psql
Previous Message Bruce Momjian 2005-04-25 17:15:53 Re: Continue transactions after errors in psql