From: Tom Lane <tgl@sss.pgh.pa.us>
To: loren@paradigm.xyz
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17626: Permission denied errors should list role as well as user
Date: Mon, 03 Oct 2022 09:50:55 -0400
Message-ID: <1425128.1664805055@sss.pgh.pa.us> (raw)
In-Reply-To: <17626-644f053cc20e1ba3@postgresql.org>
References: <17626-644f053cc20e1ba3@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> 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".
No ... it just looks like
regression=> select * from foo; -- errors
ERROR: permission denied for table foo
I don't know where "user=elevated_user" is coming from in your
environment, but it seems like it must be from client-side code
that's not tracking the active role correctly.
regards, tom lane
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: tgl@sss.pgh.pa.us, loren@paradigm.xyz, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17626: Permission denied errors should list role as well as user
In-Reply-To: <1425128.1664805055@sss.pgh.pa.us>
* 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