Re: [HACKERS] Continue transactions after errors in psql

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Joshua D. Drake" <jd@commandprompt.com>
Cc: Richard Huxton <dev@archonet.com>, Michael Paesold <mpaesold@gmx.at>, Greg Sabino Mullane <greg@turnstep.com>, pgsql-hackers@postgresql.org, pgsql-patches@postgresql.org
Date: 2005-04-26T14:57:49Z
Lists: pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.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