line numbers in error messages are off wrt debuggers

Поиск
Список
Период
Сортировка
От Andres Freund
Тема line numbers in error messages are off wrt debuggers
Дата
Msg-id 20180620160434.vznwmgllqdtt24jx@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: line numbers in error messages are off wrt debuggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: ORDER/GROUP BY expression not found in targetlist
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PATCH: backtraces for error messages