PostgreSQL列举所有的表空间及schema及角色
来源:互联网 发布:贵州大数据 编辑:程序博客网 时间:2024/05/29 15:49
highgo=# \db --列举出所有的表空间
List of tablespaces
Name | Owner | Location
------------+--------+----------
pg_default | highgo |
pg_global | highgo |
(2 rows)
highgo=# \dn ----列举出所有的schema
List of schemas
Name | Owner
----------------+--------
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(3 rows)
highgo=# \du 列举出所有的角色或用户
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# create role aaaa;
CREATE ROLE
highgo=# \dn
List of schemas
Name | Owner
----------------+--------
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(3 rows)
highgo=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
aaaa | Cannot login | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# create schema aaa;
CREATE SCHEMA
highgo=#
highgo=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
aaaa | Cannot login | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# \dn
List of schemas
Name | Owner
----------------+--------
aaa | highgo
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(4 rows)
List of tablespaces
Name | Owner | Location
------------+--------+----------
pg_default | highgo |
pg_global | highgo |
(2 rows)
highgo=# \dn ----列举出所有的schema
List of schemas
Name | Owner
----------------+--------
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(3 rows)
highgo=# \du 列举出所有的角色或用户
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# create role aaaa;
CREATE ROLE
highgo=# \dn
List of schemas
Name | Owner
----------------+--------
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(3 rows)
highgo=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
aaaa | Cannot login | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# create schema aaa;
CREATE SCHEMA
highgo=#
highgo=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
aaaa | Cannot login | {}
highgo | Superuser, Create role, Create DB, Replication | {}
highgo=# \dn
List of schemas
Name | Owner
----------------+--------
aaa | highgo
hgdb_catalog | highgo
oracle_catalog | highgo
public | highgo
(4 rows)
阅读全文
0 0
- PostgreSQL列举所有的表空间及schema及角色
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- PostgreSQL数据库、表空间、角色及用户
- 循序渐进PostgreSQL(三): 网络访问配置、用户及角色管理、表空间及数据库创建
- postgresql 临时表空间及注意事项
- PostgreSQL表空间、模式、表、用户/角色之间的关系
- PostgreSQL 遍历表的PLSQL列举
- PostgreSQL 遍历表的PLSQL列举
- oracle 查询表空间所有表、及表所有的表空间
- oracle 查询表空间所有表、及表所有的表空间
- 查看Oracle数据库所有的用户及表空间等
- Xml Schema学习例子及命名空间
- 关于PostgreSQL数据库中的表空间,user,role,权限,模式(schema)的概念.
- Docker(初识整理)
- 输入框
- XSLT常见问题(一)转化后如何输出文件头
- 实践题目——指针及其运算
- 二叉树深度优先遍历和广度优先遍历
- PostgreSQL列举所有的表空间及schema及角色
- 企业现金流和资金链区别
- js获取table的行数与列数
- 关于tcp三次握手的学习
- HttpClient入门教程
- spark mongo
- XSLT常见问题(二)XSLT中变量的使用(variable)
- stm32f10x在keil环境下的配置
- Http请求连接池