Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIIcw-0005Nh-7n for pgsql-admin@arkaria.postgresql.org; Fri, 05 Mar 2021 22:08:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lIIct-0004zM-Rj for pgsql-admin@arkaria.postgresql.org; Fri, 05 Mar 2021 22:08:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIIct-0004yq-JW for pgsql-admin@lists.postgresql.org; Fri, 05 Mar 2021 22:08:51 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lIIcm-0004NK-CT for pgsql-admin@postgresql.org; Fri, 05 Mar 2021 22:08:50 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id C94485F799; Fri, 5 Mar 2021 17:08:42 -0500 (EST) Date: Fri, 5 Mar 2021 17:08:42 -0500 From: Stephen Frost To: Wells Oliver Cc: pgsql-admin Subject: Re: User has role, role has UPDATE, user can't update, cannot figure this out. Message-ID: <20210305220842.GZ20766@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MhgcBKmfuR2ggk1S" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --MhgcBKmfuR2ggk1S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.. >=20 > GRANT REFERENCES, UPDATE ON TABLE myschema.mytable TO analyst; >=20 > 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 deni= ed > permission? Is there a WHERE clause for the UPDATE? If so, then the role also needs SELECT rights. Thanks, Stephen --MhgcBKmfuR2ggk1S Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJgQqvqAAoJEO1sijiDR2RVKI8P/iMUW7gDBRYbb/eND9WANr+T VOKXmGnLN3oVer+6etTPum8/xMcGN0zNk0+6evuJEeu+7LtbriiaFg39djzRXcNL ZOmMjwyyuHXV2b5znMWwobdj2c54fX4fMWWR3gLbZ0DcsQY5sEsbJhNt2vrPdlMW ONmY3hxkco2Rz8PFgPDZ7NyKCkKAome1kn9tAqtjhzpPArIh8ryknyMwd+k48+E6 TnJ5f+yYvxGpTKsXNo+ks9KjRkUdUPJ8xYiIqrg2M97bnOgsxfHenRUsM1sb5bU3 tqJw2xtC59qik2A1AeplLeyhpYnCkBQfDD7fu4GyRNwDX92OYnEa4OmyXTSuUBdu UZzwtmJxv3zTVG5Lp4SanDh8xgEJKwsT0aApQzPuTJuYY5COOx3GCwHidnU1crE3 5SddDA6EtHxZdovqC62+qE1RgEsEkH/6fJuiqm+SbD/aAZdW1fUgO+if6fh82p5S wNieGHZVJkvtHcOWTVpKe6Pl+FqDqQetEyAWqiIPUWjPyqVIfQ5VoHnzPy/gq4yi PYSviFbUCBgtEmq7z9dRtZ46+ZWtQUPkW6d9oj6U/gJKbdVh9ebHifIirlwW8uwH sA9eteku/aqDHNSxWMI6oTwquLCafDx4XbBd1X51s5R1DQhuptjimlIPsIj8HJnb dAasMcarNoGbHL6loFPS =WqGG -----END PGP SIGNATURE----- --MhgcBKmfuR2ggk1S--