Re: [HACKERS] Continue transactions after errors in psql
Joshua D. Drake <jd@commandprompt.com>
From: "Joshua D. Drake" <jd@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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:44:13Z
Lists: pgsql-hackers
> I would far rather see people code explicit markers around statements
> whose failure can be ignored. That is, a script that needs this
> behavior ought to look like
>
> 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....
Sincerely,
Joshua D. Drake
Command Prompt, Inc.