LoginSignup
1

More than 5 years have passed since last update.

PostgreSQLのバージョンを確認する方法

Posted at

PostgreSQLのバージョンが環境によって違うので、それに合わせた環境でDB作る必要がある。
その時に、このバージョンが何なのか分からなくなるのでメモ。

$ psql hogehoge
psql (9.5.6, サーバー 9.3.16)

これ、どっちが正しいの?
良く分からないのでが確実な方法を...

# SELECT version();
postgreSQL 9.3.16 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 2015
0623 (Red Hat 4.8.5-11), 64-bit

よし。これで確実だ!

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
1