Re: Missing errcode() in ereport

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Amit Kapila <amit.kapila16@gmail.com>, Michael Paquier <michael@paquier.xyz>, Julien Rouhaud <rjuju123@gmail.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-25T05:27:56Z
Lists: pgsql-hackers
On Wed, Mar 25, 2020 at 9:30 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2020-03-23 17:24:49 -0400, Tom Lane wrote:
> >> Hearing no objections, I started to review Andres' patchset with
> >> that plan in mind.
>
> > Thanks for pushing the first part!
>
> I pushed all of it, actually.

I think this caused anole to say:

"reloptions.c", line 1362: error #2042: operand types are incompatible
("void" and "int")
  errdetail_internal("%s", _(optenum->detailmsg)) : 0));



Commits

  1. Go back to returning int from ereport auxiliary functions.

  2. Improve the internal implementation of ereport().

  3. Re-implement the ereport() macro using __VA_ARGS__.

  4. Add missing errcode() in a few ereport calls.