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 17:37:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> 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
> That isn't the same thing at all.  The syntax I was proposing allows the
> script writer to define a savepoint covering multiple statements,
> whereas the above does not.

Well, it fits the use case posted, that is to conditionally roll back a
_single_ failed query.  I don't see the need to add a new
infrastructure/command unless people have a use case for rolling back a
group of statements on failure.  I have no seen such a description yet.

  Bruce Momjian                        |
  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

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-04-27 21:20:48
Subject: Re: Behavior of shared/exclusive row locks
Previous:From: Greg StarkDate: 2005-04-27 17:16:48
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-04-27 18:53:41
Subject: Re: Cleaning up unreferenced table files
Previous:From: Tom LaneDate: 2005-04-27 17:20:29
Subject: Re: Cleaning up unreferenced table files

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