当前位置: 首页 > news >正文

建设网站的目的爱站网功能

建设网站的目的,爱站网功能,思源黑体做网站,食品网站建设需求分析pgsql-用户角色组角色创建和维护 环境 win10pgsql 14.2 相关文档 PostgreSQL 14.1 手册 create 语法 grant 授权语法 revoke 撤回语法 alter 更新语法 用户、角色、组角色概念和区别 早期版本#xff08;8.1之前#xff09;中用户、组、角色是不同的概念#…pgsql-用户角色组角色创建和维护 环境 win10pgsql 14.2 相关文档 PostgreSQL 14.1 手册 create 语法 grant 授权语法 revoke 撤回语法 alter 更新语法 用户、角色、组角色概念和区别 早期版本8.1之前中用户、组、角色是不同的概念现在角色的概念把“用户”和“组”的概念都包括在内。角色可以完成登录用户、组角色功能。 作为组角色时可以不为角色分配login属性作为登录用户时可以添加login属性并设置认证类型登录密码如 password ‘123456’为角色授予访问权限如为数据库对象schema、table或者column的访问权限每种对象有不同的特性 数据库对象的关系 database 数据库实例一个实例可以包含多个schema不同实例间数据不共享scheam 模式对表的一个分组同实例下的模式可以共享table 数据表 以上可以统称为数据库对象授权体系中需要不同对象有相关的特性都需要独立授权 ps:如果对表授予select权限但是无schema的usage权限查询时会提示用户没有xx模式的权限但是有schema的usage权限时同时具备了表的curd权限感觉不应该出现这个现象 创建测试表 ‘’’ create schema mall; –建table create table mall.product ( id varchar(32) not null constraint product_pk primary key, name varchar(128), price int ); create table mall.“order” ( id varchar(32) not null constraint order_pk primary key, count int, price int ); –数据初始化 insert into mall.product(id,name,price) values (‘p1’,‘n1’,1),(‘p2’,‘n2’,2),(‘p3’,‘n3’,3); insert into mall.order(id,count,price) values (‘o1’,1,1),(‘o2’,2,2),(‘o3’,2,3); –CRUD验证 select * from mall.product; delete from mall.product where id‘x’; update mall.product set name‘x’ where id‘x’; insert into mall.product(id,name,price) values (‘p1’,‘n1’,1); select * from mall.order; ‘’’ 测试用例 ‘’’ –基础语法结构 /* 创建CREATE ROLE role_name; 授权GRANT group_role TO role1, … ; 撤回REVOKE group_role FROM role1, … ; 删除DROP ROLE role_name; */ –角色组语法 create role group_role;–创建组角色 create role role1; create role role2; grant group_role to role1; grant group_role to role1,role1; –角色用户 create role w_user login password ‘123456’; --准许登录并设置密码 create role r_user login password ‘123456’; alter role r_user password ‘123123’; --修改密码 –scheam权限 { CREATE | USAGE } grant all on schema mall to w_user;–所有特性授予单个角色 grant all on schema mall to w_user,r_user;–所有特性授予多个角色 grant all on schema mall to public;–所有特性授予所有角色 grant usage on schema mall to r_user; revoke all on schema mall from w_user; --撤回 –table权限 grant all on mall.product to w_user;–单表单用户 grant all on mall.product,mall.“order” to w_user;–多表单用户 grant all on all tables in schema mall to w_user,r_user;–所有表多用户 grant all on all tables in schema mall to public;–所有表所有用户 grant all on mall.product to r_user; grant all on all tables in schema mall to r_user; revoke all on all tables in schema mall from r_user; –撤回授权 revoke all on schema mall from public;–所有用户mall模式下的所有权限 revoke all on schema mall from w_user;–单用户mall模式下的所有权限 revoke all on all tables in schema mall from w_user;–单用户mall下所有表的crud权限 revoke all on all tables in schema mall from public;–所有用户mall下表的所有权限 revoke all on schema mall from r_user; revoke all on all tables in schema mall from r_user; ‘’’ 总结 pgsql高版本中授权体系里将用户、组、角色都合并到role对象中完全松散管理。没有login特性的role可以理解为角色带login特性的可以理解为用户 官方文档中grant 授权语法里的语法结构仔细的看看结构基本一致注意下on后边的关键字对角色的理解很有帮助。
http://www.hkea.cn/news/14373415/

相关文章:

  • 做网站制作的wordpress做在线编辑图片大小
  • 网站查询seo长沙模板网站建设企业
  • 博创网站建设团队淘宝运营培训机构
  • 仿网站收费平台公司是什么意思
  • 传媒公司网站建设方案最早做淘宝客的网站
  • 网站开发 后端返回前端一个地址 有什么用网站三d图怎么做
  • 一学一做教育视频网站2022最新国际新闻10条简短
  • 微商的自己做网站叫什么名字网站里的横幅广告怎么做
  • 地方门户网站源码下载公司的网站难不难做
  • 沧州网站做电话销售需要的网站
  • 网站接口设置网站dedecms模板怎么查看修改啊
  • 私人网站开发公司wordpress 自定义栏目调用
  • wordpress通过标签获取文章汕头seo外包机构
  • 清华紫光是可以做网站的吗网站规划与开发设计
  • 云南建设监理协会网站网站为何不显示百度商桥对话框
  • 甜品网站开发需求分析营销网站建设有哪些公司
  • 织梦购物网站整站源码网站建设的实验心得
  • 零基础网站建设教学视频国外idc网站
  • 个人网站规划书模板网站开发应聘信息
  • 合肥手机网站制作宝洁网站建设
  • 什么网站可以用视频做背景wordpress判断首页
  • c mvc 大型网站开发正能量网站地址污的
  • 正规网站建设空间中国国家城乡建设部网站
  • 爱站网站排名查询工具怎样推广品牌
  • wordpress edd 会员西安seo天勤网络营销
  • 求网站建设网站优化工作wordpress 图片链接下载
  • 山西百度网站建设做网站的app
  • 面试网站建设的问题做音乐网站需要什么
  • phpcms v9企业网站模板:蓝色电子科技公司网站模板免费logo设计图案
  • 如何用网站做淘宝客网站后台模板html5