postgresql9.6中的 Row Security Policies
来源:互联网 发布:visio中文版mac下载 编辑:程序博客网 时间:2024/06/15 05:20
1.。中文VS2008下面编译pg9.6
修改VSObjectFactory.pm 中的 DetermineVisualStudioVersion 直接 return '9.00';
2.。在 ALTER TABLE accounts ENABLE ROW LEVEL SECURITY;时
a ) 在函数 ATExecEnableRowSecurity 把pg_class中的 relrowsecurity 置为 true
3。CREATE POLICY account_managers ON accounts TO managers USING (manager = current_user);
对系统表pg_policy增加了一条记录
#define PolicyRelationId 3256
CATALOG(pg_policy,3256)
{
NameData polname; /* Policy name. */
Oid polrelid; /* Oid of the relation with policy. */
char polcmd; /* One of ACL_*_CHR, or '*' for all */
#ifdef CATALOG_VARLEN
Oid polroles[1]; /* Roles associated with policy, not-NULL */
pg_node_tree polqual; /* Policy quals. */
pg_node_tree polwithcheck; /* WITH CHECK quals. */
#endif
} FormData_pg_policy;
4。使用时,就是在select或是insert时,把rewirte阶段,把polqual 和 polwithcheck 加到后面,之后在执行时进行判断
rewrite调用的函数 get_row_security_policies
执行时调用函数 ExecWithCheckOptions、ExecWithCheckOptions
和MAC的区别
1。没有等级和范围的概念
2。管理员还是可以看到全部数据
3。MAC特权概念不明显
4。Row Security Policies 需要在用户表的设计时加上限制的字段,需要改应用
- postgresql9.6中的 Row Security Policies
- LOGIGEAR SECURITY POLICIES
- Postgresql9.6中的数字和字符类型
- Testing security policies: going beyond functional testing
- centos7.2 + postgreSQL9.6
- CentOS7 PostgreSQL9.6安装
- PostgreSQL9.6并行查询
- CentOS7安装PostgreSQL9.6
- postgresql9.6 安装plpython3
- Qt中的 Size Hints 和 Size Policies
- Qt中的 Size Hints 和 Size Policies
- Qt中的 Size Hints 和 Size Policies
- Qt中的 Size Hints 和 Size Policies
- Postgresql9.6几个新参数
- ActiveMQ5.14.1使用PostgreSQL9.6
- CentOS6.x安装Postgresql9.6
- DB-PostgreSQL9.5-CentOS-6
- centos7下postgresql9.6安装
- 判断手机是否联网
- 手机适配那点事儿
- 数据库学习笔记和小练习(3)数据查询
- CSS下拉菜单
- iOS 保存图片到 系统相册
- postgresql9.6中的 Row Security Policies
- ubuntu sudo apt-get update 失败 解决方法
- UBUNTU如何安装tar.gz版的flash
- ASP.NET MVC 5 - 添加搜索
- 第十周—C语言 输出10000以内的回文数
- libevent 学习笔记 一
- python中@lazy_property
- CABasicAnimation fillMode和removedOnCompletion
- dll 调用,动态,静态