gpt4 book ai didi

postgresql - PGSQL : Grant every single right to a user on a schema

转载 作者:行者123 更新时间:2023-11-29 11:12:08 24 4
gpt4 key购买 nike

我不知道如何将每一项权利授予特定用户,我希望用户拥有架构上的每一项权利:

  • 在现有表上插入、删除、更新、选择...

我试过:

    GRANT ALL PRIVILEGES ON SCHEMA schema to "user";
GRANT ALL ON SCHEMA schema to "local_518561";
GRANT ALL PRIVILEGES ON table schema.table to "user";
GRANT ALL ON table schema.table to "user";

查询返回成功,但每次我使用其他用户时,我都会收到权限不足的错误。

最佳答案

GRANT ALL PRIVILEGES ON                  SCHEMA schema_name TO role_name;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schema_name TO role_name;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA schema_name TO role_name;

关于postgresql - PGSQL : Grant every single right to a user on a schema,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6799224/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com