2008/12/9 Alvaro Herrera <[EMAIL PROTECTED]> > 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).
