- psycopg2.errors.InsufficientPrivilege + permission denied for sequence
GRANT ALL ON 表名 TO 用户名;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO 用户名;
- mark
DB=# \h grant
GRANT ALL PRIVILEGES ON schema schemaname TO dbuser;
grant ALL PRIVILEGES on all tables in schema fds to dbuser;
GRANT ALL ON tablename TO user;
GRANT ALL PRIVILEGES ON DATABASE dbname TO dbuser;
grant select on all tables in schema public to dbuser;--给用户读取public这个schema下的所有表
GRANT create ON schema schemaname TO dbuser;--给用户授予在schema上的create权限,比如create table、create view等
GRANT USAGE ON schema schemaname TO dbuser;
grant select on schema public to dbuser;--报错ERROR: invalid privilege type SELECT for schema
--USAGE:对于程序语言来说,允许使用指定的程序语言创建函数;对于Schema来说,允许查找该Schema下的对象;对于序列来说,允许使用currval和nextval函数;对于外部封装器来说,允许使用外部封装器来创建外部服务器;对于外部服务器来说,允许创建外部表。
- refer
- https://blog.csdn.net/u012824097/article/details/104046077
评论列表,共 0 条评论
暂无评论