On 11/18/22 12:52, Murillo corvino rocha wrote:
> Could it be the role=group_read_only? The fact that user1 is a member of
> group_read_only is changing current_user variable?
Well role=group_read_only means this:
psql -d database -h host -U user1
effectively becomes:
psql -d database -h host -U user1
log in as user1 then
SET ROLE group_read_only;
which results in
session_user: user1
current_user: group_read_only.
user_1 being a member of group_read_only does not automatically change
the current_user to group_read_only. This happened because it was
explicitly set up do this.
>
> I’m using a clean psql docker container everytime I need to connect to
> the database, so, I don’t think it’s related to psql.
>
> \drds
>
> List of settings
>
> Role | Database | Settings
>
> --------------+--------------+-----------------------------------
>
> user1 | mydb | role=group_read_only
>
--
Adrian Klaver
adrian.klaver@aklaver.com