pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: SET ROLE and search_path
Date: Wed, 20 May 2020 13:32:49 -0600
Message-ID: <87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.com> (raw)
In-Reply-To: <CAMjNa7c7_N4wzgP1suBd9XLAz0VSwG+g2Ra8pBKVvV0w5H6eDg@mail.gmail.com>
References: <AM6PR05MB5287F42DF5C317F2BDA42E43EFB60@AM6PR05MB5287.eurprd05.prod.outlook.com>
	<CAMjNa7c7_N4wzgP1suBd9XLAz0VSwG+g2Ra8pBKVvV0w5H6eDg@mail.gmail.com>



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 ...

view thread (7+ messages)  latest in thread

Message-ID: <87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.com>
Permalink:  ../87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.com/
Also on:    postgresql.org/message-id/87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.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: robjsargent@gmail.com
  Subject: Re: SET ROLE and search_path
  In-Reply-To: <87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.com>
  References: <AM6PR05MB5287F42DF5C317F2BDA42E43EFB60@AM6PR05MB5287.eurprd05.prod.outlook.com> <CAMjNa7c7_N4wzgP1suBd9XLAz0VSwG+g2Ra8pBKVvV0w5H6eDg@mail.gmail.com> <87a84390-7fb3-5f38-ed81-6ac3473b12bd@gmail.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