mirror of
https://github.com/postgres/postgres.git
synced 2026-01-13 12:22:55 +03:00
Go back to returning int from ereport auxiliary functions.
This reverts the parts of commit 17a28b0364
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
This commit is contained in:
@@ -307,7 +307,7 @@ typedef struct ParseCallbackState
|
||||
|
||||
extern ParseState *make_parsestate(ParseState *parentParseState);
|
||||
extern void free_parsestate(ParseState *pstate);
|
||||
extern void parser_errposition(ParseState *pstate, int location);
|
||||
extern int parser_errposition(ParseState *pstate, int location);
|
||||
|
||||
extern void setup_parser_errposition_callback(ParseCallbackState *pcbstate,
|
||||
ParseState *pstate, int location);
|
||||
|
||||
Reference in New Issue
Block a user