Обсуждение: SET ROLE versus SET SESSION AUTHORIZATION

Поиск
Список
Период
Сортировка

SET ROLE versus SET SESSION AUTHORIZATION

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/sql-set-role.html
Description:

"SET ROLE has effects comparable to SET SESSION AUTHORIZATION, but the
privilege checks involved are quite different."

What are the differences in privilege checks?

How are the two commands the same and different, semantically?

Re: SET ROLE versus SET SESSION AUTHORIZATION

От
Laurenz Albe
Дата:
On Tue, 2024-01-30 at 17:25 +0000, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/16/sql-set-role.html
> Description:
>
> "SET ROLE has effects comparable to SET SESSION AUTHORIZATION, but the
> privilege checks involved are quite different."
>
> What are the differences in privilege checks?
>
> How are the two commands the same and different, semantically?

The difference is revealed by "SELECT session_user".

I think that is pretty clearly described in the SET SESSION AUTHORIZATION
documentation page.

Yours,
Laurenz Albe