LoginSignup
0
2

More than 5 years have passed since last update.

psqlを叩くとWarningが出るので消してやった

Posted at

PostgreSQLのバージョンは9.5を入れたはずなのに8.4を指し示しているようなので、その参照を更新しました。

-bash-4.2$ psql postgres deploy
psql (9.2.15, server 9.5.4)
WARNING: psql version 9.2, server version 9.5.
         Some psql features might not work.
Type "help" for help.

実行ファイルを探します

-bash-4.2$ which -a psql
/bin/psql
/usr/bin/psql
# find / -name psql 2>/dev/null
/usr/pgsql-9.5/bin/psql
/usr/bin/psql

/usr/bin/psqlの方が古いのでこちらをリネームして、9.5の方のpsqlのシンボリックリンクを張ることで置き換えます。

まずはリネームして残しておきます。名前は「.old」というのを書き足しましたがなんでもいいです。

# mv /usr/bin/psql /usr/bin/psql.old

これで一応再起動して確認します。

-bash-4.2$ psql
psql (9.5.4)
Type "help" for help.
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2