分类标签归档:Postgre

PostgreSQL常用的查询语句


查看帮助命令

DB=# help --总的帮助
DB=# \h --SQL commands级的帮助
DB=# \? --psql commands级的帮助
按列显示,类似MySQL的\G

DB=# \x
Expanded display is on.
查看DB安装目录(最好root用户执行)

find / -name initdb
查看有多少DB实例在运行(最好root用户执行)

find / -name postgresql.conf
查看DB版本

cat $PGDATA/PG_VERSION

psql --version

DB=# show server_version;

全部内容