pgsql: Go back to returning int from ereport auxiliary functions.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Go back to returning int from ereport auxiliary functions.
Date: 2020-03-25 15:57:42
Message-ID: E1jH8PW-0000M4-ET@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2020-03-25 16:21:12 pgsql: pg_dump: Allow dumping data of specific foreign servers
Previous Message Peter Eisentraut 2020-03-25 13:39:02 pgsql: Define EXEC_BACKEND in pg_config_manual.h