PostgreSQL - relation [table] does not exist

前端 未结 2 966
刺人心
刺人心 2021-01-11 10:30

I just created a new user that I want to have access to a limited number of our public tables. The user is created and I granted privs to one public table for now. I then lo

相关标签:
2条回答
  • 2021-01-11 11:28

    Even though I was granting privileges to my pgb2b user, I forgot to specify usage for that user:

    GRANT usage on schema public to pgb2b;
    

    This fixed the issue. I found this post about setting up PostgreSQL user permissions very helpful.

    0 讨论(0)
  • 2021-01-11 11:32

    Note for others who may see this, though it may not apply to this particular question --

    If you are not using the public schema, you need to update the search_path

    SET search_path TO my_schema, public;
    

    Credit: Why does PostgreSQL's \dt show only public schema tables?

    0 讨论(0)
提交回复
热议问题