From: | Ganesh Korde <ganeshakorde(at)gmail(dot)com> |
---|---|
To: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: get user info on log |
Date: | 2022-09-17 02:22:37 |
Message-ID: | CAPNyb0VH0qf8nrHEnrHPDfMGWwyKQzHSwmoMtYwoC9KVVx8SbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
You can use log_line_prefix in postgresql.conf to log the user name into
the logs.
Regards,
Ganesh Korde.
On Fri, 16 Sep 2022, 6:31 pm Marcos Pegoraro, <marcos(at)f10(dot)com(dot)br> wrote:
> Em qui., 15 de set. de 2022 às 12:59, Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com> escreveu:
>
>> test(5432)=# set role maura;
>> ERROR: role "maura" does not exist
>> test(5432)=# SET SESSION AUTHORIZATION 'maura';
>> ERROR: role "maura" does not exist
>>
>> No, I was asking about an error occurring later, not on set session
> authorization command.
>
> set role maura;
> --user Maura exists and set was done correctly
> --now I´m working as Maura
> select 1/0; -- I would like to see this exception on log being logged as
> maura
>
> thanks
> Marcos
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | sivapostgres@yahoo.com | 2022-09-17 05:28:25 | Re: Query Performance |
Previous Message | Christophe Pettus | 2022-09-16 21:23:57 | Re: Extension rpath issues on MacOS |