Re: Make ON_ERROR_STOP stop on shell script failure

From: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
To: bt22nakamorit <bt22nakamorit(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Make ON_ERROR_STOP stop on shell script failure
Date: 2022-09-28 12:49:30
Message-ID: 6fd74d4bf62664b0320cde3f7a48f522@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-09-20 15:15, bt22nakamorit wrote:

> I edited the documentation for ON_ERROR_STOP.
> Any other suggestions?

Thanks for the patch!

> 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?

--
Regards,

--
Atsushi Torikoshi
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-09-28 12:57:49 Re: longfin and tamandua aren't too happy but I'm not sure why
Previous Message Robert Haas 2022-09-28 12:26:53 Re: longfin and tamandua aren't too happy but I'm not sure why