Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Continue transactions after errors in psql

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:44:13
Message-ID: 426E53BD.1040806@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> 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.




In response to

Responses

pgsql-hackers by date

Next:From: Harald FuchsDate: 2005-04-26 14:47:03
Subject: Re: Continue transactions after errors in psql
Previous:From: Tom LaneDate: 2005-04-26 14:35:26
Subject: Re: [HACKERS] Continue transactions after errors in psql

pgsql-patches by date

Next:From: Harald FuchsDate: 2005-04-26 14:47:03
Subject: Re: Continue transactions after errors in psql
Previous:From: Tom LaneDate: 2005-04-26 14:35:26
Subject: Re: [HACKERS] Continue transactions after errors in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group