【发布时间】:2014-10-18 07:43:21
【问题描述】:
我使用的是 CentOS6.3 并安装了 PostgreSQL9.1 服务器。使用 psql 命令连接到 Postgres 服务器。
psql -h localhost -U postgres
这是我得到的结果。
postgres=# \c MYDB
psql (8.4.11, server 9.1.7)
WARNING: psql version 8.4, server version 9.1.
Some psql features might not work.
You are now connected to database "MYDB".
MYDB=#
谁能告诉我可能是什么原因。
更新
即使我卸载了 PostgreSQL9.1 服务器,仍然可以看到以下命令的结果。
`[root@testserver bin]# find / -name 'postgres'
/var/spool/mail/postgres
[root@testserver bin]# find / -name 'psql'
/usr/bin/psql
[root@testserver bin]# which psql
/usr/bin/psql
[root@testserver bin]# which postgres
/usr/bin/which: no postgres in (/usr/lib64/qt- 3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/root/bin)
[root@testserver bin]# psql --version
psql (PostgreSQL) 8.4.11
contains support for command-line editing
[root@testserver bin]#`
这里我的意图是如果你执行 which psql 命令,如果没有安装服务器,它不应该显示任何输出。但是,我卸载了 Postgres 服务器并删除了 /opt/PostgreSQL 文件夹。
提前感谢。
【问题讨论】:
标签: postgresql centos psql