Permission denied on schema <schema_name> from supabase UI
Hi everyone, I'm trying to view my data via the supabase UI and running to this issue (see attached SS). I'm pretty sure the problem is that this schema was created / is owned by a different user (one I created for an external integration) so postgres, supabase_admin, or whatever user is executing the query to display to the UI does not have access to it by default. (
SELECT current_user; -- returns postgres
)
I guess my question is twofold -
1. how should I resolve this in the short-term (is there a better way other than to make sure I grant all on schema ... to ...
after creating each schema
2. is there a set of best-practices for application-specific user management
1 Reply
Not sure how you created the schema but postgres user has to have been granted access for the dashboard UI or SQL editor to work.
If you want access from the API then there are other roles.
This is the code Supabase shows to restore the public schema and would be needed to do all things Supabase like on the public schema.