pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: mihail.gershkovich@gmail.com
Subject: BUG #16942: Misleading error message on denied permission for column in table
Date: Wed, 24 Mar 2021 22:27:21 +0000
Message-ID: <16942-979301fdd7dd4a48@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16942
Logged by:          Mihail Gershkovich
Email address:      mihail.gershkovich@gmail.com
PostgreSQL version: 13.0
Operating system:   OpenSUSE
Description:        

-- reproduce:

CREATE ROLE table_writer; CREATE ROLE table_reader; CREATE ROLE
table_processor;
GRANT column_reader TO column_writer;

CREATE TABLE column_access_test (open1 varchar, open2 varchar, closed1
varchar);

GRANT SELECT(open1,open2,closed1) ON column_access_test  TO
table_processor;
GRANT INSERT(open1,open2, closed1 ), UPDATE(open1,open2, closed1 ) ON
column_access_test TO column_writer;
GRANT SELECT(open1,open2) ON column_access_test  TO column_reader ;

SET ROLE column_reader;
SELECT open1, open2 from column_access_test; -- works fine
SELECT open1, open2, closed1 from column_access_test; -- access is
prohibited, as expected, but error message is misleading

/*
Error:
SQL Error [42501]: ERROR: permission denied for table XYZ
should be something like: ERROR: permission denied for column A in table B
makes troubleshooting of permissions cumbersome.
*/



Message-ID: <16942-979301fdd7dd4a48@postgresql.org>
Permalink:  ../16942-979301fdd7dd4a48@postgresql.org/
Also on:    postgresql.org/message-id/16942-979301fdd7dd4a48@postgresql.org

 · 

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, mihail.gershkovich@gmail.com
  Subject: Re: BUG #16942: Misleading error message on denied permission for column in table
  In-Reply-To: <16942-979301fdd7dd4a48@postgresql.org>

* 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