From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: loren@paradigm.xyz
Subject: BUG #17626: Permission denied errors should list role as well as user
Date: Sat, 01 Oct 2022 21:09:54 +0000
Message-ID: <17626-644f053cc20e1ba3@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17626
Logged by: Loren Siebert
Email address: loren@paradigm.xyz
PostgreSQL version: 14.5
Operating system: Debian
Description:
I'm running this set of commands:
create user elevated_user IN ROLE pg_read_all_data;
create user regular_user;
create table foo (id int);
set role elevated_user;
select * from foo; -- works
set role regular_user;
select * from foo; -- errors
The error message looks like "user=elevated_user ERROR: permission denied
for table foo".
In fact, that user does have permission to access the table. But the
regular_role it has just assumed does not.
I would suggest that the error message look like "user=elevated_user,
role=regular_user ERROR: permission denied for table foo"
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, loren@paradigm.xyz
Subject: Re: BUG #17626: Permission denied errors should list role as well as user
In-Reply-To: <17626-644f053cc20e1ba3@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