Re: [HACKERS] Continue transactions after errors in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Michael Paesold <mpaesold(at)gmx(dot)at>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Continue transactions after errors in psql
Date: 2005-04-26 14:57:49
Message-ID: 2082.1114527469@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>> BEGIN;
>> \begin_ignore_error
>> DROP TABLE foo;
>> \end_ignore_error
>> CREATE ...
>> ...
>> COMMIT;

> That seems awful noisy. Why not just:

> BEGIN:
> DROP TABLE foo;
> ERROR: table foo does not exist;
> CONTINUE;
> etc....

Well, ignoring questions of how we choose to spell the commands, the
thing I'd not like about the second alternative is that it doesn't
afford any control over the number of statements rolled back upon
error.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-04-26 15:03:40 Re: [HACKERS] Continue transactions after errors in psql
Previous Message Teodor Sigaev 2005-04-26 14:54:39 Re: btree_gist regression tests failing in 8.0 branch?

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-04-26 15:03:40 Re: [HACKERS] Continue transactions after errors in psql
Previous Message Tom Lane 2005-04-26 14:53:09 Re: [HACKERS] Continue transactions after errors in psql