PostgreSQL 安全管理 访问控制

1 列级安全性

 GRANT select(title),update(last_update) ON film  TO user01;
 

2 查看列级权限

2.1 视图方式查看

SELECT attname,attacl 
FROM pg_attribute 
WHERE attrelid='film'::regclass AND attacl is not null;
//屏幕输出:
   attname   |       attacl
-------------+---------------------
 title       | {user01=r/postgres}
 last_update | {user01=w/postgres}
(2 rows)

2.2 元命令方式查看

\dp film;