schema间对象的访问操作权限
(1)使用超级用户highgo登录数据库,创建测试schema a和b,并创建测试表a.at和b.bt
highgo=#\du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
a | | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=#\du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
a | | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# select current_user;
current_user
--------------
highgo
(1row)
highgo=#create schema a;
CREATESCHEMA
highgo=#create schema b;
CREATESCHEMA
highgo=#create table a.at (id int);
CREATETABLE
highgo=#insert into a.at values (1);
INSERT0 1
highgo=#create table b.bt (id int);
CREATETABLE
highgo=#insert into b.bt values (1);
INSERT0 1
highgo=#select * from a.at;
id </