Go back to returning int from ereport auxiliary functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Mar 2020 15:57:36 +0000 (11:57 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Mar 2020 15:57:36 +0000 (11:57 -0400)
commitbda6dedbea599209048bc51115ecb2062ceb976c
tree978a9e7efd646601f82780c6dcd41eb274f29acc
parentf5817595a7f194d25bc9be5b035eb1f7f60cd1fa
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
14 files changed:
src/backend/executor/execUtils.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_node.c
src/backend/parser/scan.l
src/backend/storage/ipc/dsm_impl.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/error/elog.c
src/include/executor/executor.h
src/include/parser/parse_coerce.h
src/include/parser/parse_node.h
src/include/parser/scanner.h
src/include/utils/elog.h
src/pl/plpgsql/src/pl_scanner.c
src/pl/plpgsql/src/plpgsql.h