Re: Make ON_ERROR_STOP stop on shell script failure - Mailing list pgsql-hackers

From bt22nakamorit
Subject Re: Make ON_ERROR_STOP stop on shell script failure
Date
Msg-id 36360350378935c823a9dbbff5b2e54e@oss.nttdata.com
Whole thread Raw
In response to Re: Make ON_ERROR_STOP stop on shell script failure  (torikoshia <torikoshia@oss.nttdata.com>)
Responses Re: Make ON_ERROR_STOP stop on shell script failure
List pgsql-hackers
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?

Tatsu



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: longfin and tamandua aren't too happy but I'm not sure why
Next
From: Nathan Bossart
Date:
Subject: Re: identifying the backend that owns a temporary schema