码迷,mamicode.com
首页 > 数据库 > 详细

postgresql的安装与基础语法

时间:2020-05-10 19:26:20      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:gre   pos   创建数据库   编码   temp   ctc   bsp   nbsp   创建   

查看用户

postgres-# \du

角色名称 | 属性 | 成员属于
----------+--------------------------------------------+----------
postgres | 超级用户, 建立角色, 建立 DB, 复制, 绕过RLS | {}

查看所有数据库

postgres-# \l

名称 | 拥有者 | 字元编码 | 校对规则 | Ctype | 存取权限
-----------+----------+----------+--------------------------------+--------------------------------+-----------------------
postgres | postgres | UTF8 | Chinese (Simplified)_China.936 | Chinese (Simplified)_China.936 |
template0 | postgres | UTF8 | Chinese (Simplified)_China.936 | Chinese (Simplified)_China.936 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | Chinese (Simplified)_China.936 | Chinese (Simplified)_China.936 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 行记录)

创建数据库

postgres=# create database mydb;
CREATE DATABASE

 

 

postgresql的安装与基础语法

标签:gre   pos   创建数据库   编码   temp   ctc   bsp   nbsp   创建   

原文地址:https://www.cnblogs.com/rockluoye/p/12864303.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!