4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PostgreSQLで\dを実行した際にcolumn c.relhasoids does not existというエラーが出てテーブルの詳細がみれない

4
Posted at

TL; DR

起動しているサーバーとクライアント側でPostgreSQLのバージョンが違うため。
psqlのバージョンをサーバーのバージョンと合わせる1

詳細

テーブルの詳細を見ようと、\dを実行したところ以下のエラーが出ました。
これはサーバー側のPostgreSQLのバージョンが12なのに対してクライアント側のバージョンが11だったためです2

project=# \d table_name
ERROR:  column c.relhasoids does not exist
LINE 1: ...riggers, c.relrowsecurity, c.relforcerowsecurity, c.relhasoi...

Homebrewを用いてPostgreSQL 12をインストールする方法

  1. https://stackoverflow.com/questions/58461178/how-to-fix-error-column-c-relhasoids-does-not-exist-in-postgres

  2. https://postgresql.verite.pro/blog/2019/04/24/oid-column.html

4
3
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
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?