Re: [HACKERS] Allowing nonzero return codes from \quit

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [HACKERS] Allowing nonzero return codes from \quit
Дата
Msg-id CAFj8pRAMvR5t7UaaL5kaasdf3_5bt5tr8bb0V2kNZu2DMW9-FA@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] Allowing nonzero return codes from \quit  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: [HACKERS] Allowing nonzero return codes from \quit  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers


2017-01-23 19:09 GMT+01:00 Corey Huinker <corey.huinker@gmail.com>:
Another suggestion to come out of the \quit_if discussion was that someone might want to send a return code other than 0 back. Something like this:

\quit 4

or even:

\set exit_code 127
\quit :exit_code

This isn't a personal need of mine, but I figured it was an idea worth discussing on its own.

\quit exit_code is better - if we define some special variable, then we have to specify when it should be used and when not. Taking value from command is clean without any another questions.

Regards

Pavel

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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: [HACKERS] Allowing nonzero return codes from \quit
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] Undefined psql variables