Re: Badly designed error reporting code in controldata_utils.c

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Badly designed error reporting code in controldata_utils.c
Дата
Msg-id 20160307012621.dszlz4cenjv6wobt@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Badly designed error reporting code in controldata_utils.c  (Joe Conway <mail@joeconway.com>)
Ответы Re: Badly designed error reporting code in controldata_utils.c  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2016-03-06 17:16:42 -0800, Joe Conway wrote:
> - #ifndef FRONTEND
> - /* NOTE: caller must provide gettext call around the format string */
> - #define log_error(...)    \
> -     elog(ERROR, __VA_ARGS__)
> - #else
> - #define log_error(...)    \
> -     do { \
> -             char *buf = psprintf(__VA_ARGS__); \
> -             fprintf(stderr, "%s: %s\n", progname, buf); \
> -             exit(2); \
> -     } while (0)
> - #endif
> -

FWIW I'm considering implementing elog/ereport properly for the
frontend.  We've grown several hacks around that not being present, and
I think those by now have a higher aggregate complexity than a proper
implementation would have.

Greetings,

Andres Freund



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: The plan for FDW-based sharding
Следующее
От: Robert Haas
Дата:
Сообщение: Re: The plan for FDW-based sharding