Re: elog/ereport noreturn decoration

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog/ereport noreturn decoration
Date: 2012-08-19 02:37:27
Message-ID: 1345343847.18148.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Phil Sorber 2012-08-19 16:02:31 PATCH: psql boolean display
Previous Message Jeff Janes 2012-08-18 19:01:49 Re: [PATCH] Docs: Make notes on sequences and rollback more obvious