如何查询在postgres中授予对象的所有格兰仕?
例如,我有表“ mytable”:
GRANT SELECT, INSERT ON mytable TO user1 GRANT UPDATE ON mytable TO user2
我需要带给我的东西:
user1: SELECT, INSERT user2: UPDATE
我已经找到了:
SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable'