RES: RES: session_user different from current_user after normal login

2022-11-19 Thread Murillo corvino rocha
1 Para: Murillo corvino rocha<mailto:murillo_corvinoro...@hotmail.com> Cc:Adrian Klaver<mailto:adrian.kla...@aklaver.com>; pgsql-general@lists.postgresql.org<mailto:pgsql-general@lists.postgresql.org> Assunto: Re: RES: session_user different from current_user after normal logi

Re: RES: RES: session_user different from current_user after normal login

2022-11-18 Thread Tom Lane
Murillo corvino rocha writes: > \drds > List of settings > Role| Database | Settings > --+--+--- > user1| mydb | role=group_read_only Yeah, that would explain it ... what applied

Re: RES: RES: session_user different from current_user after normal login

2022-11-18 Thread Adrian Klaver
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 dat

Re: RES: session_user different from current_user after normal login

2022-11-18 Thread Tom Lane
Murillo corvino rocha writes: > I am just logging in (using psql) and doing the select: SELECT session_user, > current_user; > The PostgreSQL is an AWS RDS 12.12 instance. No script is being executed. No > one besides me is connected to the database. Could it be any server level > configuration

RES: session_user different from current_user after normal login

2022-11-18 Thread Murillo corvino rocha
urillo corvino rocha<mailto:murillo_corvinoro...@hotmail.com>; pgsql-general@lists.postgresql.org<mailto:pgsql-general@lists.postgresql.org> Assunto: Re: RES: session_user different from current_user after normal login On 11/17/22 13:26, Murillo corvino rocha wrote: > I am just loggin

RES: session_user different from current_user after normal login

2022-11-18 Thread Murillo corvino rocha
.postgresql.org> Assunto: Re: session_user different from current_user after normal login On 11/17/22 07:11, Murillo corvino rocha wrote: > Hi, > > We have a situation where two users are members of a group, like below: > > Following the solution in the discussion above, we solve

Re: RES: session_user different from current_user after normal login

2022-11-17 Thread Adrian Klaver
On 11/17/22 13:26, Murillo corvino rocha wrote: I am just logging in (using psql) and doing the select: SELECT session_user, current_user; The PostgreSQL is an AWS RDS 12.12 instance. No script is being executed. No one besides me is connected to the database. Could it be any server level con

Re: session_user different from current_user after normal login

2022-11-17 Thread Adrian Klaver
On 11/17/22 07:11, Murillo corvino rocha wrote: Hi, We have a situation where two users are members of a group, like below: Following the solution in the discussion above, we solved our problem using the command: SET SESSION AUTHORIZATION ; For our example: SET SESSION AUTHORIZATION user

session_user different from current_user after normal login

2022-11-17 Thread Murillo corvino rocha
Hi, We have a situation where two users are members of a group, like below: group_read_only |- user1 |- user2 We tried to change the password for those users, using a query like below: ALTER ROLE user1 PASSWORD 'sup3r$4fe'; but got a "ERROR: permission denied" (using pgadmin4 and psql