Re: psql exit status varies for scripts on STDIN

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: psql exit status varies for scripts on STDIN
Дата
Msg-id 200409140840.00022.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: psql exit status varies for scripts on STDIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> If -c is considered to be a shorthand for a script, then this ought
> to yield either 0 or 3 depending on whether ON_ERROR_STOP is set by
> ~/.psqlrc.  However I'm not sure if ~/.psqlrc is read for a -c
> invocation.  I'd be willing to agree that -c should act as though
> ON_ERROR_STOP is set always ... but in that case the exit code should
> be 3, not 1.

-c isn't really like a script, it's just a one-shot command.  (You can't
mix SQL and meta-commands, for example.)  I think changing the exit
status from 1 to 3 is reasonable.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Deadlock removal
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Best practices for migrating a development database