docs: set role permission checking, do I read this wrong?

Поиск
Список
Период
Сортировка
От Daniel Westermann
Тема docs: set role permission checking, do I read this wrong?
Дата
Msg-id 93e0bf53-41ae-4718-a1c5-cec36283bbc7@dbi-services.com
обсуждение исходный текст
Ответы Re: docs: set role permission checking, do I read this wrong?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-docs
Hi,

when reading the documentation about "set role" there is this:
https://www.postgresql.org/docs/16/sql-set-role.html

"After |SET ROLE|, permissions checking for SQL commands is carried out 
as though the named role were the one that had logged in originally."

Given this:

postgres=# select session_user, current_user;
  session_user | current_user
--------------+--------------
  postgres     | postgres
(1 row)

postgres=# set role a;
SET
postgres=> create table t(a int);
ERROR:  permission denied for schema public
LINE 1: create table t(a int);
                      ^
Isn't it the other way around and permission checking is done as "a", or 
do I read this wrong?

Best regards
Daniel



В списке pgsql-docs по дате отправления:

Предыдущее
От: jian he
Дата:
Сообщение: Re: No explanation of other options
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: docs: set role permission checking, do I read this wrong?