Postgres 中是否有与 Oracle 的 user_role_privs 视图等效的视图?
Is there an equivalent to Oracle's user_role_privs view in Postgres?
我正在尝试在 Postgres 中获取相当于 Oracle user_role_privs
的信息。
select username,granted_role,admin_option from user_role_privs
我在 Postgres 中尝试了以下所有视图,但找不到想要的视图
information_schema.role_table_grants
pg_roles;
pg_class;
pg_user
pg_catalog.pg_auth_members;
谁能建议在 Postgres 中应该使用哪个视图来获取 username
、granted_role
和 admin_option
?
您正在寻找 pg_auth_members
系统目录,其中包含角色之间的关系(在 PostgreSQL 中既是用户又是组)。
要获取用户和角色的名称,请加入 pg_roles
系统目录。
我正在尝试在 Postgres 中获取相当于 Oracle user_role_privs
的信息。
select username,granted_role,admin_option from user_role_privs
我在 Postgres 中尝试了以下所有视图,但找不到想要的视图
information_schema.role_table_grants
pg_roles;
pg_class;
pg_user
pg_catalog.pg_auth_members;
谁能建议在 Postgres 中应该使用哪个视图来获取 username
、granted_role
和 admin_option
?
您正在寻找 pg_auth_members
系统目录,其中包含角色之间的关系(在 PostgreSQL 中既是用户又是组)。
要获取用户和角色的名称,请加入 pg_roles
系统目录。