ERROR: permission denied for schema user1_gmail_com at character 46

前端 未结 3 1533
渐次进展
渐次进展 2020-12-24 05:30

I need to restrict a user, access only on a particualr schema tables only.So I tried following query and login as user1_gmail_com. But I got following error when I try to br

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 05:58

    You need to grant access not only to the tables in the schema, but also to the schema itself.

    From the manual:

    By default, users cannot access any objects in schemas they do not own. To allow that, the owner of the schema must grant the USAGE privilege on the schema.

    So either make your created user the owner of the schema, or grant USAGE on the schema to this user.

提交回复
热议问题