revoke

Cannot drop a role that is granted to connect database

。_饼干妹妹 提交于 2020-07-03 11:47:26
问题 I am using PostgreSQL 10.4 and I found a strange behavior. If we create an role and grant it to CONNECT the database: CREATE ROLE dummy; GRANT CONNECT ON DATABASE test TO dummy; Then we cannot drop this role, even if it owns no object at all, this command: DROP ROLE dummy; Raises: ERROR: role "dummy" cannot be dropped because some objects depend on it SQL state: 2BP01 Detail: privileges for database test Documentation is a bit misleading: Class 2B — Dependent Privilege Descriptors Still Exist

Cannot drop a role that is granted to connect database

百般思念 提交于 2020-07-03 11:47:09
问题 I am using PostgreSQL 10.4 and I found a strange behavior. If we create an role and grant it to CONNECT the database: CREATE ROLE dummy; GRANT CONNECT ON DATABASE test TO dummy; Then we cannot drop this role, even if it owns no object at all, this command: DROP ROLE dummy; Raises: ERROR: role "dummy" cannot be dropped because some objects depend on it SQL state: 2BP01 Detail: privileges for database test Documentation is a bit misleading: Class 2B — Dependent Privilege Descriptors Still Exist

Why role cannot be dropped because some objects depend on it

南楼画角 提交于 2020-05-17 06:48:06
问题 Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in schema public,firma1 from "roletodelete" cascade; revoke all on all sequences in schema public,firma1 from "roletodelete" cascade; revoke all on database mydb from "roletodelete" cascade; revoke all on all functions in schema public,firma1 from "roletodelete" cascade; revoke all on schema public,firma1 from "roletodelete" cascade; revoke

Move Tables & Revoke All Privileges

安稳与你 提交于 2019-12-11 17:39:45
问题 We need users to move their tables from their personal schemas (user_db.username) to the managed schema (userdb.groupname) which provides a predefined set of permissions for select access. In moving the table, we need to accomplish the following: Move the table out of the old schema Remove the old select grants Apply the new grants from the managed schema I've reviewed the Alter table .. rename to.. documentation, and while that appears to enable movement of the table, it would retain the old