PG 授权
Posted by 2025/7/24 17:36:04 • Author:JK.Li •
-- 模式所有人 ALTER SCHEMA "模式名称" OWNER TO "用户名"; -- 指定模式下所有表格的所有权限 grant ALL PRIVILEGES on all tables in schema 模式名称 to 用户名; -- 1、模式授权 grant usage on schema kernel_external to 用户名; -- 2、授权模式下所有表格查询权限 grant select on all tables in schema 模式名称 to 用户名; --移除权限 REVOKE SELECT ON ALL TABLES IN SCHEMA 模式名称 FROM 用户名; -- 权限查询 SELECT grantee, table_catalog, table_schema, table_name, privilege_type FROM information_schema.role_table_grants WHERE grantee = '用户名' AND table_schema = '模式名称';
Tagged: pg
0 评论列表
发表评论
Wise Words
We can let circumstances rule us, or we can take charge and rule our lives from
within .![]()
Earl Nightingale