Re: using __func__ to locate and distinguish some error messages

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: using __func__ to locate and distinguish some error messages
Дата
Msg-id 202406070828.yk7qilhxvodz@alvherre.pgsql
обсуждение исходный текст
Ответ на using __func__ to locate and distinguish some error messages  (jian he <jian.universality@gmail.com>)
Ответы Re: using __func__ to locate and distinguish some error messages
Список pgsql-hackers
On 2024-Jun-07, jian he wrote:

> so when it actually happens, it cannot quickly locate which function
> where the error has happened.
> maybe under certain conditions (e.g. certain build type or certain
> log_min_messages),
> we can also print out the function name by using gcc __func__.

That information is already in the error data, so you don't need it in
the message text.  You can change your log_error_verbosity if you want
it to show up in the log; in psql you can use \errverbose to have it
shown to you after the error is thrown, or you can use
  \pset VERBOSITY verbose
to have it printed for every error message.  Tools other than psql would
need their own specific ways to display those.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Hay que recordar que la existencia en el cosmos, y particularmente la
elaboración de civilizaciones dentro de él no son, por desgracia,
nada idílicas" (Ijon Tichy)



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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: use CREATE DATABASE STRATEGY = FILE_COPY in pg_upgrade
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Compress ReorderBuffer spill files using LZ4