Reputation: 745
I uninstalled my PostgreSQL because I'm trying to use version 9.1.9. I tried reinstalling it. It successfully installed from what I can see.
However, when typing in psql --version
on the command line, I get that it is still using version 9.0.10
How can I make it use the new version?
Upvotes: 2
Views: 3876
Reputation: 19
If you're running this on a UNIX/Linux system the problem is likely to do with where psql is being called from. It doesn't sound like the old version got removed and you're still calling it when you run psql. Try running this:
which psql
That will tell you the full path of what gets invoked when you run just psql. To see if there are other instances of psql installed on your system try running:
sudo updatedb
(you'll need to put in your password here). And then:
locate psql
Your system likely uses some kind of package manager, which controls which packages are installed. For example, Ubuntu/Debian use dpkg, Redhat uses yum, you may be using something like fink or macports if you are using OSX.
Upvotes: 1
Reputation: 656706
psql
is the command line interface and its version can be independent of the Postgres server.
To get the version of the server software run SELECT version()
against the database you are connected to (from within psql). Though it is possible to interact with different versions, some obvious limitations apply. I suggest you uninstall the outdated psql
as well and use the version matching the server.
Upvotes: 1