Re: elog/ereport noreturn decoration

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: elog/ereport noreturn decoration
Дата
Msg-id 1345343847.18148.1.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на elog/ereport noreturn decoration  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Fri, 2012-06-29 at 23:35 +0300, Peter Eisentraut wrote:
> My proposal with ereport would be to do this:
> 
> diff --git i/src/include/utils/elog.h w/src/include/utils/elog.h
> --- i/src/include/utils/elog.h
> +++ w/src/include/utils/elog.h
> @@ -104,7 +104,8 @@
>   */
>  #define ereport_domain(elevel, domain, rest)   \
>         (errstart(elevel, __FILE__, __LINE__, PG_FUNCNAME_MACRO, domain) ? \
> -        (errfinish rest) : (void) 0)
> +        (errfinish rest) : (void) 0),                                     \
> +               (elevel >= ERROR ? abort() : (void) 0)
> 
> There are no portability problems with that.

While the discussion on what to do about elog() was ongoing, I think
there should be no problems with this ereport() change, so I intend to
go ahead with it.





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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: [PATCH] Docs: Make notes on sequences and rollback more obvious
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: In docs, change a few cases of "not important" to "unimportant".