pgsql 常用命令 {#articleContentId}
- 
连接到 PostgreSQL 数据库
psql -U username -d database_name
psql -U postgres -h172.17.0.3 -p5434 -dpostgres
 - 
退出 PostgreSQL
\q
 - 
列出所有数据库
\l
 
L
- 
连接到指定数据库
\c database_name
 - 
列出所有表
\dt
 
51工具盒子
            连接到 PostgreSQL 数据库
psql -U username -d database_name
psql -U postgres -h172.17.0.3 -p5434 -dpostgres
退出 PostgreSQL
\q
列出所有数据库
\l
L
连接到指定数据库
\c database_name
列出所有表
\dt