Re: User has role, role has UPDATE, user can't update, cannot figure this out.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: User has role, role has UPDATE, user can't update, cannot figure this out.
Date: 2021-03-05 22:08:42
Message-ID: 20210305220842.GZ20766@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greetings,

* Wells Oliver (wells(dot)oliver(at)gmail(dot)com) wrote:
> It seems very straight forward, but I have a user belongs to the role
> analyst, and the role analyst has the permission to UPDATE, e.g..
>
> GRANT REFERENCES, UPDATE ON TABLE myschema.mytable TO analyst;
>
> But the user gets a permission denied error on the table for a simple
> UPDATE query. I can't figure it out: no trigger functions. A few FKs, but
> nothing complex. Is there a way to figure out why this user is being denied
> permission?

Is there a WHERE clause for the UPDATE? If so, then the role also needs
SELECT rights.

Thanks,

Stephen

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2021-03-05 22:34:51 Re: User has role, role has UPDATE, user can't update, cannot figure this out.
Previous Message Wells Oliver 2021-03-05 21:41:20 User has role, role has UPDATE, user can't update, cannot figure this out.