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

Re: [HACKERS] Continue transactions after errors in psql

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>,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-27 16:39:44
Message-ID: 200504271639.j3RGdiO13979@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> >>> \begin_ignore_error
> >>> DROP TABLE foo;
> >>> \end_ignore_error
> 
> > I meant it's a lot to type ;-)
> 
> Well, that's just a matter of choosing good (ie short) names for the
> backslash commands.  I was trying to be clear rather than proposing
> names I would actually want to use ;-).  Any suggestions?

Well, if we allowed ON_ERROR_ROLLBACK to work in non-interactive
sessions we could just do:

	\set ON_ERROR_ROLLBACK on
	DROP TABLE foo;
	\set ON_ERROR_ROLLBACK off

No new syntax required.  Seems this variable is going to need an
'interactive' setting, which means it isn't boolean anymore.

Also, should we allow 'true/false' to work with these seetings?  We do
that with boolean columns in SQL.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-27 17:16:40
Subject: Re: [HACKERS] Continue transactions after errors in psql
Previous:From: Dave HeldDate: 2005-04-27 15:47:36
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-04-27 17:13:11
Subject: Re: Cleaning up unreferenced table files
Previous:From: Heikki LinnakangasDate: 2005-04-27 14:33:52
Subject: Re: Cleaning up unreferenced table files

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