如何新增和删除postgres数据库

 时间:2026-02-15 11:19:59

1、打开终端窗口。

如何新增和删除postgres数据库

2、sudo su postgres,这样我们就能进入这个postgres用户。

如何新增和删除postgres数据库

3、输入psql --version可以查看版本。

如何新增和删除postgres数据库

4、psql -l,可以查看数据库列表。

如何新增和删除postgres数据库

如何新增和删除postgres数据库

5、这个时候创建一个不重名的数据库,createdb test。

如何新增和删除postgres数据库

如何新增和删除postgres数据库

6、psql test就能进入test数据库,输入help可以查看有什么指令帮助。

如何新增和删除postgres数据库

如何新增和删除postgres数据库

如何新增和删除postgres数据库

如何新增和删除postgres数据库

如何新增和删除postgres数据库

7、dropdb test就是删除数据库。

如何新增和删除postgres数据库

如何新增和删除postgres数据库

如何新增和删除postgres数据库

  • java将对象转换为JSON字符串
  • linux常用四个查找文件命令详解
  • 图解SQL Server 中发布步骤
  • Ubuntu14.04安装搜狗输入法
  • Beyond Compare如何批量处理差异文件
  • 热门搜索
    吉林旅游景点 回转火锅怎么样 赣州旅游 宝宝长牙发烧怎么办 怎么瘦腿最快 粗的拼音怎么写 兰州旅游攻略 天津旅游攻略 孕妇可以吃桑葚吗 什么方法可以祛斑