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

Re: [HACKERS] Continue transactions after errors in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
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 15:19:51
Message-ID: 2246.1114528791@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> 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's a lot of work.

How so?  It's a minuscule extension to the psql patch already coded:
just provide backslash commands to invoke the bits of code already
written.

> In this particular case I would actually like to 
> see us provide "DROP IF EXISTS ..." or some such.

That's substantially more work, with substantially less scope of
applicability: it would only solve the issue for DROP.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2005-04-26 15:46:45
Subject: Re: [HACKERS] Continue transactions after errors in psql
Previous:From: Tom LaneDate: 2005-04-26 15:15:35
Subject: Re: bitmapscan test, no success, bs is not faster

pgsql-patches by date

Next:From: Heikki LinnakangasDate: 2005-04-26 15:40:36
Subject: Re: Cleaning up unreferenced table files
Previous:From: Andrew DunstanDate: 2005-04-26 15:03:40
Subject: Re: [HACKERS] Continue transactions after errors in psql

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