Re: trivial improvement to system_or_bail

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: trivial improvement to system_or_bail
Дата
Msg-id 608961.1625067927@sss.pgh.pa.us
обсуждение исходный текст
Ответ на trivial improvement to system_or_bail  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: trivial improvement to system_or_bail  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> When PostgresNode::system_or_bail() fails, it's quite opaque as to what
> is happening.  This patch improves things by printing some detail, as
> suggested in Perl's doc for system().

+1 for adding the extra details, but another thing that I've always found
very confusing is just the phrasing of the message itself.  It makes
no sense unless (a) you know that "system" is Perl's function for
executing a shell command, (b) you are familiar with Perl's generally
cavalier approach to parentheses, and (c) you are also unbothered by
whether the word "failed" is part of the message text or the command
being complained of.  We really need to do something to set off the
shell command's text from the surrounding verbiage a little better.

I'd prefer something like

    command "pg_ctl start" failed: details here

            regards, tom lane



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: trivial improvement to system_or_bail
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: Dependency to logging in jsonapi.c