pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: antonov@stdpr.ru
Cc: pgsql-docs@postgresql.org
Subject: Re: "$user" and SESSION_USER and CURRENT_USER
Date: Thu, 20 Dec 2018 13:42:32 -0500
Message-ID: <9732.1545331352@sss.pgh.pa.us> (raw)
In-Reply-To: <159151fb45d490c8d31ea9707e9ba99d@stdpr.ru>
References: <159151fb45d490c8d31ea9707e9ba99d@stdpr.ru>

antonov@stdpr.ru writes:
> here -- https://www.postgresql.org/docs/11/runtime-config-client.html

> there is the text """If one of the list items is the special name $user, 
> then the schema having the name returned by SESSION_USER is substituted, 
> if there is such a schema and the user has USAGE permission for it. (If 
> not, $user is ignored.)""".

> but actualy "$user" substitutes CURRENT_USER-value (not 
> SESSION_USER-value).

Huh.  Digging in the commit history, SESSION_USER was the original
implementation (commit 838fe25a9 of 2002-04-01) but it was changed later
that month (ccfaf9067 of 2002-04-29) when we added schema permissions
checks.  Evidently I forgot to update the docs to match :-(

Will fix, thanks for noticing!

			regards, tom lane




view thread (2+ messages)

Message-ID: <9732.1545331352@sss.pgh.pa.us>
Permalink:  ../9732.1545331352@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9732.1545331352@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, antonov@stdpr.ru
  Subject: Re: "$user" and SESSION_USER and CURRENT_USER
  In-Reply-To: <9732.1545331352@sss.pgh.pa.us>

* 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