Re: manejo de error

From: "Claudio Gajardo Garrido" <claudio(dot)gajardo(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Gabriel Ferro" <gabrielrferro(at)yahoo(dot)com(dot)ar>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: manejo de error
Date: 2008-12-10 12:38:38
Message-ID: aa15b79c0812100438v2b6d8be8o64ded768f5658b94@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

2008/12/9 Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>

> Gabriel Ferro escribió:
>
> > hay alguna menara de hacer que en caso de un error no se sigua
> > ejecutando un archivo sql?
>
> Define la variable de ambiente ON_ERROR_STOP.
>
> --
> Alvaro Herrera
> http://www.PlanetPostgreSQL.org/
> "If it wasn't for my companion, I believe I'd be having
> the time of my life" (John Dunbar)
> --
> TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?
> http://archives.postgresql.org/pgsql-es-ayuda

En el manual de PostgreSQL 8.3 encontre esto (pagina 1223) :

ON_ERROR_STOP
By default, if non-interactive scripts encounter an error, such as a
malformed SQL command or
internal meta-command, processing continues. This has been the traditional
behavior of psql but
it is sometimes not desirable. If this variable is set, script processing
will immediately terminate.
If the script was called from another script it will terminate in the same
fashion. If the outermost
script was not called from an interactive psql session but rather using the
-f option, psql will
return error code 3, to distinguish this case from fatal error conditions
(error code 1).

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Gabriel Ferro 2008-12-10 13:19:54 Re: manejo de error
Previous Message Emanuel Calvo Franco 2008-12-10 12:26:28 Re: Instalacion en Windows XP