pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Murillo corvino rocha <murillo_corvinorocha@hotmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: session_user different from current_user after normal login
Date: Thu, 17 Nov 2022 09:35:55 -0800
Message-ID: <359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com> (raw)
In-Reply-To: <CO6PR17MB50288F5AC97DF80B8EAB6B67EB069@CO6PR17MB5028.namprd17.prod.outlook.com>
References: <CO6PR17MB50288F5AC97DF80B8EAB6B67EB069@CO6PR17MB5028.namprd17.prod.outlook.com>

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 <username>;
> 
> For our example:
> 
> SET SESSION AUTHORIZATION user1;
> 
> After that, it was possible to change the user password.
> 
> My question is: is that a normal behavior? should I, after a normal 
> loggin, be logged as
> 
> group_read_only as my current_user?

Something or someone is doing SET ROLE group_read_only.

> 
> Thanks in advance.
> 
> Murillo.
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (2+ messages)

Message-ID: <359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com>
Permalink:  ../359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com/
Also on:    postgresql.org/message-id/359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, murillo_corvinorocha@hotmail.com
  Subject: Re: session_user different from current_user after normal login
  In-Reply-To: <359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com>
  References: <CO6PR17MB50288F5AC97DF80B8EAB6B67EB069@CO6PR17MB5028.namprd17.prod.outlook.com> <359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com>

* 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