Re: [PATCHES] Continue transactions after errors in psql - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [PATCHES] Continue transactions after errors in psql
Date
Msg-id 200504271639.j3RGdiO13979@candle.pha.pa.us
Whole thread Raw
In response to Re: [PATCHES] Continue transactions after errors in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Continue transactions after errors in psql
List pgsql-hackers
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-hackers by date:

Previous
From: "Dave Held"
Date:
Subject: Re: [PERFORM] Bad n_distinct estimation; hacks suggested?
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Continue transactions after errors in psql