omnia@ubuntu:~$ psql --version
psql (PostgreSQL) 9.3.4
omnia@ubuntu:~$ pg_dump --version
pg_dump (PostgreSQL) 9.2.8
omnia@ubuntu:~$ dpkg -l | grep pg
ii gnupg 1.4.11-3ubuntu2.5 GNU privacy guard - a free PGP replacement
ii gpgv 1.4.11-3ubuntu2.5 GNU privacy guard - signature verification tool
ii libgpg-error0 1.10-2ubuntu1 library for common error values and messages in GnuPG components
ii libpq5 9.3.4-1.pgdg60+1 PostgreSQL C client library
ii pgdg-keyring 2013.2 keyring for apt.postgresql.org
ii postgresql-9.2 9.2.8-1.pgdg60+1 object-relational SQL database, version 9.2 server
ii postgresql-9.3 9.3.4-1.pgdg60+1 object-relational SQL database, version 9.3 server
ii postgresql-client-9.2 9.2.8-1.pgdg60+1 front-end programs for PostgreSQL 9.2
ii postgresql-client-9.3 9.3.4-1.pgdg60+1 front-end programs for PostgreSQL 9.3
ii postgresql-client-common 154.pgdg60+1 manager for multiple PostgreSQL client versions
ii postgresql-common 154.pgdg60+1 PostgreSQL database-cluster manager
ii python-gnupginterface 0.3.2-9.1ubuntu3 Python interface to GnuPG (GPG)
ii unattended-upgrades 0.76ubuntu1 automatic installation of security upgrades
ii update-manager-core 1:0.156.14.13 manage release upgrades
omnia@ubuntu:~$
看起来我已经安装了两个版本,但是pg_dump卡在了一个较旧的版本?很奇怪,因为两个版本都链接到同一个“wrapper”:
omnia@ubuntu:~$ readlink /usr/bin/psql
../share/postgresql-common/pg_wrapper
omnia@ubuntu:~$ readlink /usr/bin/pg_dump
../share/postgresql-common/pg_wrapper
我做错了什么?
sudo ln -sf /usr/lib/postgresql/9.3/bin/pg_dump /usr/bin/pg_dump
。 - nkamm