| From: | Christoph Moench-Tegeder <cmt(at)burggraben(dot)net> |
|---|---|
| To: | Dominique Devienne <ddevienne(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: DEFINER / INVOKER conundrum |
| Date: | 2023-04-03 12:59:03 |
| Message-ID: | ZCrNl0h+5vS/m9Nc@squirrel.exwg.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
## Dominique Devienne (ddevienne(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christoph Moench-Tegeder | 2023-04-03 13:06:04 | Re: Very slow queries followed by checkpointer process killed with signal 9 |
| Previous Message | Joe Conway | 2023-04-03 12:33:19 | Re: Very slow queries followed by checkpointer process killed with signal 9 |