pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: User has role, role has UPDATE, user can't update, cannot figure this out.
Date: Fri, 5 Mar 2021 17:08:42 -0500
Message-ID: <20210305220842.GZ20766@tamriel.snowman.net> (raw)
In-Reply-To: <CAOC+FBVPf2AHtFasggtLDqdXBX4cF44VShJaacRhp_UY0MnK0Q@mail.gmail.com>
References: <CAOC+FBVPf2AHtFasggtLDqdXBX4cF44VShJaacRhp_UY0MnK0Q@mail.gmail.com>

Greetings,

* Wells Oliver (wells.oliver@gmail.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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (3+ messages)  latest in thread

Message-ID: <20210305220842.GZ20766@tamriel.snowman.net>
Permalink:  ../20210305220842.GZ20766@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20210305220842.GZ20766@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sfrost@snowman.net, wells.oliver@gmail.com
  Subject: Re: User has role, role has UPDATE, user can't update, cannot figure this out.
  In-Reply-To: <20210305220842.GZ20766@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox