当前位置:网站首页>Gbase 8C create user / role example 2
Gbase 8C create user / role example 2
2022-07-03 02:22:00 【Dazhuang twelve】
6、 Create a copy account :repl
gbase=# CREATE USER repl REPLICATION LOGIN ENCRYPTED PASSWORD 'repl';
CREATE ROLE
7、 Other instructions
GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
[, ...] | ALL [ PRIVILEGES ] }
ON { [ TABLE ] table_name [, ...]
| ALL TABLES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
## Single table Authorization : to grant authorization zjy The account can be accessed schema by zjy Of zjy surface grant select,insert,update,delete on zjy.zjy to zjy;
## All forms authorized :grant select,insert,update,delete on all tables in schema zjy to zjy;
GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( column_name [, ...] )
[, ...] | ALL [ PRIVILEGES ] ( column_name [, ...] ) }
ON [ TABLE ] table_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
## Column Authorization , Authorize the specified column (zjy schema Under the zjy Tabular name Column ) The update permission of is given to zjy user grant update (name) on zjy.zjy to zjy;
## The specified column grants different permissions ,zjy schema Under the zjy surface , Check for updates name、age Field , Insert name Field grant select (name,age),update (name,age),insert(name) on zjy.xxx to zjy;
GRANT { { USAGE | SELECT | UPDATE }
[, ...] | ALL [ PRIVILEGES ] }
ON { SEQUENCE sequence_name [, ...]
| ALL SEQUENCES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
## Sequence ( Self increasing bond ) Property Authorization , Appoint zjy schema Under the seq_id_seq to zjy user grant select,update on sequence zjy.seq_id_seq to zjy;
## Sequence ( Self increasing bond ) Property Authorization , To the user zjy to grant authorization zjy schema All the sequences below grant select,update on all sequences in schema zjy to zjy;
GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [, ...] | ALL [ PRIVILEGES ] }
ON DATABASE database_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
## Access to database , to grant authorization cc Users connect to the database zjygrant connect on database zjy to cc;
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON DOMAIN domain_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN DATA WRAPPER fdw_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN SERVER server_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
ON { { FUNCTION | PROCEDURE | ROUTINE } routine_name [ ( [ [ argmode ] [ arg_name ] arg_type [, ...] ] ) ] [, ...]
| ALL { FUNCTIONS | PROCEDURES | ROUTINES } IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON LANGUAGE lang_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }
ON LARGE OBJECT loid [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { CREATE | USAGE } [, ...] | ALL [ PRIVILEGES ] }
ON SCHEMA schema_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
## Connect schema jurisdiction , to grant authorization cc visit zjy schema jurisdiction grant usage on schema zjy to cc;
GRANT { CREATE | ALL [ PRIVILEGES ] }
ON TABLESPACE tablespace_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON TYPE type_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
where role_specification can be:
[ GROUP ] role_name
| PUBLIC
| CURRENT_USER
| SESSION_USER
GRANT role_name [, ...] TO role_name [, ...] [ WITH ADMIN OPTION ]
## hold zjy The user's rights are granted to the user cc.
grant zjy to cc;
边栏推荐
- GBase 8c 创建用户/角色 示例二
- [Yu Yue education] reference materials of love psychology of China University of mining and technology
- Leetcode (540) -- a single element in an ordered array
- Gbase 8C system table PG_ conversion
- [shutter] top navigation bar implementation (scaffold | defaulttabcontroller | tabbar | tab | tabbarview)
- easyPOI
- Prohibited package name
- easyExcel
- Return a tree structure data
- [Yu Yue education] reference materials of chemical experiment safety knowledge of University of science and technology of China
猜你喜欢
Create + register sub apps_ Define routes, global routes and sub routes
Machine learning notes (constantly updating...)
Pytorch convolution network regularization dropblock
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)
Tongda OA V12 process center
[shutter] top navigation bar implementation (scaffold | defaulttabcontroller | tabbar | tab | tabbarview)
详细些介绍如何通过MQTT协议和华为云物联网进行通信
easyPOI
Detailed introduction to the deployment and usage of the Nacos registry
Use go language to realize try{}catch{}finally
随机推荐
javeScript 0.1 + 0.2 == 0.3的问题
How to deal with cache hot key in redis
Qt之QComboBox添加QCheckBox(下拉列表框插入复选框,含源码+注释)
Detailed introduction to the usage of Nacos configuration center
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)
GBase 8c系统表-pg_authid
[tutorial] chrome turns off cross domain policies CORS and samesite, and brings cookies across domains
人脸识别6- face_recognition_py-基于OpenCV使用Haar级联与dlib库进行人脸检测及实时跟踪
Su Shimin: 25 principles of work and life
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)
Deep learning notes (constantly updating...)
stm32F407-------DMA
Socket programming
require. context
UDP receive queue and multiple initialization test
【教程】chrome關閉跨域策略cors、samesite,跨域帶上cookie
GBase 8c系统表-pg_amproc
Detailed introduction to the deployment and usage of the Nacos registry
Missing library while loading shared libraries: libisl so. 15: cannot open shared object file: No such file
CFdiv2-Fixed Point Guessing-(区间答案二分)