From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: using __func__ to locate and distinguish some error messages |
Date: | 2024-06-07 08:38:24 |
Message-ID: | CACJufxFxMQ2NR8C=1136_djKbT=sebuPoYh3u0ueA7cNTLCeww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 7, 2024 at 4:28 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> 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.
>
Thanks for pointing this out.
From | Date | Subject | |
---|---|---|---|
Next Message | Bertrand Drouvot | 2024-06-07 08:41:36 | Re: Avoid orphaned objects dependencies, take 3 |
Previous Message | Dilip Kumar | 2024-06-07 08:38:23 | Re: Compress ReorderBuffer spill files using LZ4 |