Linux下 PostgrelSQL 基本操作

一、在默认配置条件下,本机访问PostgreSQL

切换到Linux用户postgres,然后执行psql:

su - postgres

Last login: Wed Mar 1 13:16:48 CST 2017 on pts/1
-bash-4.2$ psql

psql (9.2.18)
Type "help" for help.

postgres=#

此时就在数据库postgres中了。

 

\l

查询数据库列表

 

\c 数据库名 选择数据库

 

exit 退出

posted @ 2019-06-14 09:31  _小豪豪  阅读(2368)  评论(0编辑  收藏  举报