Hi,
I'm fairly frequently annoyed that when I see an error message in the
log, I can't just generally set a breakpoint on the included line
number. That's because the line number in the error message is from the
*end* of the message:
2018-06-20 09:02:39.226 PDT [21145][3/2] LOG: 00000: statement: SELECT 1;
2018-06-20 09:02:39.226 PDT [21145][3/2] LOCATION: exec_simple_query, postgres.c:952
corresponds to
ereport(LOG,
(errmsg("statement: %s", query_string),
errhidestmt(true),
errdetail_execute(parsetree_list)));
with 952 being the line with the semicolon.
Are others bothered by this?
If so, does anybody have a handle how we could get a more useful line
number out of the preprocessor?
Greetings,
Andres Freund