Re: Make ON_ERROR_STOP stop on shell script failure

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Make ON_ERROR_STOP stop on shell script failure
Дата
Msg-id 20220929.123504.1824301713608286657.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Make ON_ERROR_STOP stop on shell script failure  (bt22nakamorit <bt22nakamorit@oss.nttdata.com>)
Ответы Re: Make ON_ERROR_STOP stop on shell script failure  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
At Thu, 29 Sep 2022 11:29:40 +0900, bt22nakamorit <bt22nakamorit@oss.nttdata.com> wrote in 
> 2022-09-28 21:49 に torikoshia さんは書きました:
> >>    if (result == 127 || result == -1)
> >>    {
> >>        pg_log_error("\\!: failed");
> >>        return false;
> >>    }
> >>    else if (result != 0) {
> >>        pg_log_error("command failed");
> >>        return false;
> > Since it would be hard to understand the cause of failures from these
> > two messages, it might be better to clarify them in the messages.
> > The former comes from failures of child process creation or execution
> > on it and the latter occurs when child process creation and execution
> > succeeded but the return code is not 0, doesn't it?
> > I also felt it'd be natural that the latter message also begins with
> > "\\!" since both message concerns with \!.
> > How do you think?
> 
> Thank you for the feedback!
> I agree that the messages should be more clear.
> \\!: command was not executed
> \\!: command failed
> Would these two messages be enough to describe the two cases?

FWIW, I would spell these as something like this:

> \\!: command execution failure: %m
> \\!: command returned failure status: %d

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: longfin and tamandua aren't too happy but I'm not sure why
Следующее
От: Andres Freund
Дата:
Сообщение: Re: longfin and tamandua aren't too happy but I'm not sure why