Re: Continue transactions after errors in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Paesold" <mpaesold(at)gmx(dot)at>
Cc: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Continue transactions after errors in psql
Date: 2005-03-08 07:21:18
Message-ID: 3703.1110266478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-08 08:07:13 Re: BUG #1528: Rows returned that should be excluded by WHERE clause
Previous Message Michael Paesold 2005-03-08 07:05:27 Re: Continue transactions after errors in psql

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Kirkwood 2005-03-08 08:24:49 Re: Display Pg buffer cache (WIP)
Previous Message Neil Conway 2005-03-08 07:05:53 Re: Display Pg buffer cache (WIP)