以下为刚接触postgresql常需要的数据库命令:
select * from information_schema.table_privileges where grantee=‘用户名‘;select * from information_schema.usage_privileges where grantee=‘用户名‘;
- admindb=> INSERT INTO authors (name) VALUES (‘Mo Yan‘);
- ERROR: permission denied for table authors
- admindb=# GRANT ALL PRIVILEGES ON TABLE authors TO admin;
- GRANT
- admindb=> INSERT INTO authors (name) VALUES (‘Mo Yan‘);
- ERROR: permission denied for sequence authors_id_seq
- admindb=# GRANT ALL PRIVILEGES ON SEQUENCE authors_id_seq TO admin; GRANT
上一篇
数据库表关系及配置