Re: [HACKERS] Continue transactions after errors in psql

От: Bruce Momjian
Тема: Re: [HACKERS] Continue transactions after errors in psql
Дата: ,
Msg-id: 200504271737.j3RHbcH23405@candle.pha.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane)
Список: pgsql-patches

Скрыть дерево обсуждения

Re: [HACKERS] Continue transactions after errors in psql  ("Greg Sabino Mullane", )
 Re: [HACKERS] Continue transactions after errors in psql  ("Michael Paesold", )
  Re: [HACKERS] Continue transactions after errors in psql  (Richard Huxton, )
   Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
    Re: [HACKERS] Continue transactions after errors in psql  ("Joshua D. Drake", )
     Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
    Re: [HACKERS] Continue transactions after errors in psql  (Andrew Dunstan, )
     Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
      Re: [HACKERS] Continue transactions after errors in psql  (Andrew Dunstan, )
       Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
        Re: [HACKERS] Continue transactions after errors in psql  (Bruce Momjian, )
         Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
          Re: [HACKERS] Continue transactions after errors in psql  (Bruce Momjian, )
    Re: [HACKERS] Continue transactions after errors in psql  (John DeSoi, )
 Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
  Re: [HACKERS] Continue transactions after errors in  (Philip Warner, )
   Re: [HACKERS] Continue transactions after errors in psql  (Tom Lane, )
  Re: [HACKERS] Continue transactions after errors in psql  ("Greg Sabino Mullane", )
  Re: [HACKERS] Continue transactions after errors in psql  (Robert Treat, )
 Re: [HACKERS] Continue transactions after errors in psql  ("Michael Paesold", )

Tom Lane wrote:
> Bruce Momjian <> 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                        |  http://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-patches по дате сообщения:

От: Bruce Momjian
Дата:
Сообщение: Re: Cleaning up unreferenced table files
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Continue transactions after errors in psql