Re: Make ON_ERROR_STOP stop on shell script failure
От
Kyotaro Horiguchi
Тема
Re: Make ON_ERROR_STOP stop on shell script failure
Дата
Msg-id
20220927.123425.211849117477195012.horikyota.ntt@gmail.com
Ответ на
Re: Make ON_ERROR_STOP stop on shell script failure (Fujii Masao)
Список
Дерево обсуждения
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>
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 bt22nakamorit <bt22nakamorit@oss.nttdata.com>
Re: Make ON_ERROR_STOP stop on shell script failure torikoshia <torikoshia@oss.nttdata.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>
Re: Make ON_ERROR_STOP stop on shell script failure Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Make ON_ERROR_STOP stop on shell script failure Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure walther@technowledgy.de
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 Fujii Masao <masao.fujii@oss.nttdata.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 bt22nakamorit <bt22nakamorit@oss.nttdata.com>
Re: Make ON_ERROR_STOP stop on shell script failure David Zhang <david.zhang@highgo.ca>
Re: Make ON_ERROR_STOP stop on shell script failure Matheus Alcantara <mths.dev@pm.me>
Re: Make ON_ERROR_STOP stop on shell script failure Andreas 'ads' Scherbaum <ads@pgug.de>
Re: Make ON_ERROR_STOP stop on shell script failure Andreas 'ads' Scherbaum <ads@pgug.de>
Re: Make ON_ERROR_STOP stop on shell script failure Greg Stark <stark@mit.edu>
Re: Make ON_ERROR_STOP stop on shell script failure Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: Make ON_ERROR_STOP stop on shell script failure Corey Huinker <corey.huinker@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure Corey Huinker <corey.huinker@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure Daniel Gustafsson <daniel@yesql.se>
Re: Make ON_ERROR_STOP stop on shell script failure "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure Corey Huinker <corey.huinker@gmail.com>
Re: Make ON_ERROR_STOP stop on shell script failure Justin Pryzby <pryzby@telsasoft.com>
Re: Make ON_ERROR_STOP stop on shell script failure Corey Huinker <corey.huinker@gmail.com>
At Wed, 21 Sep 2022 11:45:07 +0900, Fujii Masao wrote in > > > On 2022/09/20 15:15, bt22nakamorit wrote: > >>>> I thought that this action is rather unexpected since, based on the > >>>> word """ON_ERROR_STOP""", ones may expect that failures of shell > >>>> scripts should halt the incoming instructions as well. > >>>> One clear solution is to let failures of shell script stop incoming > >>>> queries just like how errors of SQLs do currently. Thoughts? > > +1 > > > > I edited the documentation for ON_ERROR_STOP. > > Any other suggestions? > > Thanks for the patch! > Could you add it to the next CommitFest so that we don't forget it? > > > We can execute the shell commands via psql in various ways > other than \! meta-command. For example, > > * `command` > * \g | command > * \gx | command > * \o | command > * \w | command > * \copy ... program 'command' > > ON_ERROR_STOP should handle not only \! but also all the above in the > same way? +1 > One concern about this patch is that some applications already depend > on > the current behavior of ON_ERROR_STOP, i.e., psql doesn't stop even > when > the shell command returns non-zero exit code. If so, we might need to > extend ON_ERROR_STOP so that it accepts the following setting values. > > * off - don't stop even when either sql or shell fails (same as the > * current behavior) > * on or sql - stop only whensql fails (same as the current behavior) > * shell - stop only when shell fails > * all - stop when either sql or shell fails > > Thought? +1 regards. -- Kyotaro Horiguchi NTT Open Source Software Center
В списке pgsql-hackers по дате отправления