问题描述
我使用的是Greenplum 6.8(Postgres 9.4)开放源代码,我创建了对模式具有所有权限的角色,在将该角色分配给用户之后,我在模式中添加了一个新表,但用户无法访问该表。我必须刷新角色定义才能访问该新表,角色定义如下:
grant usage on schema <schema_name> to <rolename>;
grant select on all tables in schema <schema_name> to <rolename>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema_name> GRANT SELECT ON TABLES TO <rolename>;
解决方法
在MySQL中,其配置automatic_sp_privileges
中有一个标志;但是我也在Greenplum寻找同样的东西。