Re: BUG #17626: Permission denied errors should list role as well as user - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17626: Permission denied errors should list role as well as user
Date
Msg-id 1425128.1664805055@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17626: Permission denied errors should list role as well as user  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17626: Permission denied errors should list role as well as user
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Translation bug in French starting in v13
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #17626: Permission denied errors should list role as well as user