pgsql: Go back to returning int from ereport auxiliary functions. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Go back to returning int from ereport auxiliary functions.
Date
Msg-id E1jH8PW-0000M4-ET@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Define EXEC_BACKEND in pg_config_manual.h
Next
From: Alvaro Herrera
Date:
Subject: pgsql: pg_dump: Allow dumping data of specific foreign servers