Re: pg_upgrade: Improve invalid option handling

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: pg_upgrade: Improve invalid option handling
Дата
Msg-id CAD21AoAG5fKJBJZhdy=sz=0RW0NxjaJjTHYKe8wcmpt1Bz44Vw@mail.gmail.com
обсуждение исходный текст
Ответ на pg_upgrade: Improve invalid option handling  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: pg_upgrade: Improve invalid option handling  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Jun 13, 2019 at 5:19 PM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
>
> Currently, calling pg_upgrade with an invalid command-line option aborts
> pg_upgrade but leaves a pg_upgrade_internal.log file lying around.  This
> patch reorder things a bit so that that file is not created until all
> the options have been parsed.
>

-                               pg_fatal("Try \"%s --help\" for more
information.\n",
-                                                os_info.progname);
-                               break;
+                               fprintf(stderr, _("Try \"%s --help\"
for more information.\n"),
+                                               os_info.progname);
+                               exit(1);

Why do we need to change pg_fatal() to fprintf() & exit()? It seems to
me that we can still use pg_fatal() here since we write the message to
stderr.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center



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

Предыдущее
От:
Дата:
Сообщение: RE: BEFORE UPDATE trigger on postgres_fdw table not work
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Improve handling of pg_stat_statements handling of bind "IN" variables