1

I have a multi-tenant PostgreSQL db on a Ruby on Rails app, and when I try to access to tables on some schemas on Postico, I get the following error:

Failed to load table schema.
Query failed
PostgreSQL said: permission denied for schema coaching

I tried to run: GRANT USAGE ON SCHEMA "lacerba-api" TO "postico7" but I get ERROR: permission denied for schema lacerba-api

Of course my user have writing permission on the db.

Any idea how to solve it?

Matteo
  • 53
  • 1
  • 5
  • You need to log in as someone with the power to do the grant. Like the schema's owner, or a superuser. – jjanes Feb 10 '22 at 16:30

1 Answers1

0

My guess is that your user doesn't have permission to read tables in the coaching schema. You can try granting your user permission to read tables in that schema:

GRANT SELECT ON SCHEMA coaching TO postico7

Root_DE
  • 71
  • 6
  • My bad, I copied the wrong schema name. However, it does not work neither with GRANT SELECT ON SCHEMA coaching TO postico7 – Matteo Feb 10 '22 at 15:37