pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Go back to returning int from ereport auxiliary functions.
Date: Wed, 25 Mar 2020 15:57:42 +0000
Message-ID: <E1jH8PW-0000M4-ET@gemulon.postgresql.org> (raw)

Go back to returning int from ereport auxiliary functions.

This reverts the parts of commit 17a28b03645e27d73bf69a95d7569b61e58f06eb
that changed ereport's auxiliary functions from returning dummy integer
values to returning void.  It turns out that a minority of compilers
complain (not entirely unreasonably) about constructs such as

        (condition) ? errdetail(...) : 0

if errdetail() returns void rather than int.  We could update those
call sites to say "(void) 0" perhaps, but the expectation for this
patch set was that ereport callers would not have to change anything.
And this aspect of the patch set was already the most invasive and
least compelling part of it, so let's just drop it.

Per buildfarm.

Discussion: https://postgr.es/m/CA+fd4k6N8EjNvZpM8nme+y+05mz-SM8Z_BgkixzkA34R+ej0Kw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bda6dedbea599209048bc51115ecb2062ceb976c

Modified Files
--------------
src/backend/executor/execUtils.c   |  8 ++--
src/backend/parser/parse_coerce.c  |  6 +--
src/backend/parser/parse_node.c    |  8 ++--
src/backend/parser/scan.l          |  6 +--
src/backend/storage/ipc/dsm_impl.c |  8 ++--
src/backend/utils/adt/jsonfuncs.c  |  8 ++--
src/backend/utils/error/elog.c     | 78 +++++++++++++++++++++++++++-----------
src/include/executor/executor.h    |  2 +-
src/include/parser/parse_coerce.h  |  2 +-
src/include/parser/parse_node.h    |  2 +-
src/include/parser/scanner.h       |  2 +-
src/include/utils/elog.h           | 44 ++++++++++-----------
src/pl/plpgsql/src/pl_scanner.c    |  6 +--
src/pl/plpgsql/src/plpgsql.h       |  2 +-
14 files changed, 108 insertions(+), 74 deletions(-)



Message-ID: <E1jH8PW-0000M4-ET@gemulon.postgresql.org>
Permalink:  ../E1jH8PW-0000M4-ET@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jH8PW-0000M4-ET@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Go back to returning int from ereport auxiliary functions.
  In-Reply-To: <E1jH8PW-0000M4-ET@gemulon.postgresql.org>
  References: <E1jH8PW-0000M4-ET@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox