From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: get user info on log |
Date: | 2022-09-15 15:59:48 |
Message-ID: | dff2c688-e652-8561-890e-e783c15c8686@aklaver.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 9/13/22 12:45, Marcos Pegoraro wrote:
> When using set role or set session authorization and an error occurs I
> get user name which logged in and not the one I´ve changed to.
>
> There is a way to get session_user and current_user on log ?
When I do:
test(5432)=# set role maura;
ERROR: role "maura" does not exist
test(5432)=# SET SESSION AUTHORIZATION 'maura';
ERROR: role "maura" does not exist
I get:
psql-postgres-2022-09-15 08:53:41.204 PDT-0ERROR: role "maura" does not
exist
psql-postgres-2022-09-15 08:53:41.204 PDT-0STATEMENT: set role maura;
psql-postgres-2022-09-15 08:55:26.325 PDT-0ERROR: role "maura" does not
exist
psql-postgres-2022-09-15 08:55:26.325 PDT-0STATEMENT: SET SESSION
AUTHORIZATION 'maura';
in the logs.
Are you not seeing that or do you want something different?
If you want something different then you will need to provide a more
detailed description of what that is.
>
> Thanks
> Marcos
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Mladen Gogala | 2022-09-15 23:59:32 | Re: Is it possible to stop sessions killing eachother when they all authorize as the same role? |
Previous Message | Adrian Klaver | 2022-09-15 15:40:24 | Re: Mysterious performance degradation in exceptional cases |