Re: DEFINER / INVOKER conundrum - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: DEFINER / INVOKER conundrum
Date
Msg-id ZCrNl0h+5vS/m9Nc@squirrel.exwg.net
Whole thread Raw
In response to DEFINER / INVOKER conundrum  (Dominique Devienne <ddevienne@gmail.com>)
List pgsql-general
## Dominique Devienne (ddevienne@gmail.com):

> On the one hand, I want a INVOKER security function,
> to be able to capture the login and current ROLEs.

There's session_user ("the session user's name") which remains unchanged
on a SECURITY DEFINER function, and current_user ("the user name of the
current execution context") which changes according to the security
context set by SECURITY DEFINER/INVOKER.
-> https://www.postgresql.org/docs/current/functions-info.html

Regards,
Christoph

-- 
Spare Space.



pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Very slow queries followed by checkpointer process killed with signal 9
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: Very slow queries followed by checkpointer process killed with signal 9