我已经完成了这组指令:
CREATE ROLE master
SUPERUSER CREATEDB CREATEROLE
VALID UNTIL 'infinity';
SET role = master;
CREATE TABLE test
(
name text
)
WITH (
OIDS=FALSE
);
ALTER TABLE test
OWNER TO master;
CREATE ROLE inherited LOGIN
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
GRANT master TO inherited;
set role=master;
REVOKE select on test from inherited cascade;
任何人都可以告诉我为什么我仍然可以在表测试中执行 SELECT ?这个仍然有效:
set role=inherited;
select * from test;
继承的角色在对象的所有者之后继承 - 所以这可能是一个问题。但是有没有办法撤销选择呢?