Re: SET ROLE and search_path

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SET ROLE and search_path
Date: 2020-05-20 19:32:49
Message-ID: 87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/20/20 1:28 PM, Adam Brusselback wrote:
> I have this exact setup, and I use roles / schema names that match so
> the $user var works with the search path when I set role as my
> application user.
>
> > When search_path contains “$user”, does it refer to session_user or
> current_user ?
> It uses current_user, not session_user. Works perfectly with set_role
> for me.
>
Am I (again) alone in finding this a bit hokey?  That a user name just
happens to be a schema name ...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lu, Dan 2020-05-20 20:01:03 Question on removing primary replication node using repmgr?
Previous Message Adam Brusselback 2020-05-20 19:28:21 Re: SET ROLE and search_path