[postgres@rhel73 ~]$ psql -d test -------->>>使用psql连接进入test数据库
psql (9.6.0)
Type "help" for help.
test=# \c -------->>>查看当前psql是用哪个user连接的哪个数据库
You are now connected to database "test" as user "postgres".
test=# \q -------->>>退出psql
[postgres@rhel73 ~]$ psql -d testa
psql: FATAL: database "testa" does not exist
[postgres@rhel73 ~]$
PostgreSQL数据库psql的使用之一
使用psql连接PostgreSQL
最新推荐文章于 2025-10-12 19:47:50 发布
本文介绍了如何使用psql客户端连接PostgreSQL数据库,并演示了基本的连接操作,包括连接指定的数据库、查看当前连接信息及退出psql客户端的方法。

2万+

被折叠的 条评论
为什么被折叠?



