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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Allowing nonzero return codes from \quit
Дата
Msg-id 1364.1485205958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Allowing nonzero return codes from \quit  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> I didn't think about it too much, but I don't see why a user couldn't set
>> one of those error codes.
>> I did, however, think that any attempt to set an exit_code outside of
>> [0,127] would itself be an error, resulting in an exit code of 3.

> Hmmm. Maybe it should let the user shoots its own foot if desired, just a 
> reminder in the doc of a possible interference with existing codes would 
> be enough?

Yeah, I see no reason why scripts shouldn't be allowed to return one of
those codes if they like.  We do need to constrain it to [0,127] for
sanity though, or possibly [0,125] --- doesn't POSIX mandate special
meaning for 126 and 127?
        regards, tom lane



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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] PoC: Grouped base relation