LoginSignup
2
2

More than 5 years have passed since last update.

Postgres system triggers error: permission denied

Last updated at Posted at 2016-10-18

ローカルのPostgres 環境でユニットテストを実行したら、以下のようなエラーが大量にでました。

ERROR:  permission denied: "RI_ConstraintTrigger_a_604690" is a system trigger

環境

  • Ruby on Rails
  • PostgreSQL
  • RSpec

解決方法

ユニットテストでDBにアクセスユーザの権限レベルを上げれば良い

ALTER USER user_name with SUPERUSER;

このSQLを実行するにもsuperuser権限じゃないといけないので注意

参考

2
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
2
2