Skip site navigation (1) Skip section navigation (2)

"CURRENT_ROLE" is not documented

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: "CURRENT_ROLE" is not documented
Date: 2017-05-06 08:42:04
Message-ID: alpine.DEB.2.20.1705061027580.3896@lancre (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
While trying to understand whether there was any difference, I noticed 
that CURRENT_ROLE is an undocumented synonymous for CURRENT_USER:

  psql> SELECT CURRENT_ROLE;
    current_user -- not a typo, it really says "current_user"
    calvin

  sh> grep -i CURRENT_ROLE doc/src/sgml/*/*.sgml doc/src/sgml/*.sgml
   doc/src/sgml/keywords.sgml: <entry><token>CURRENT_ROLE</token></entry>

Is there a special reason why it does not appear in the documentation? If 
not, I would suggest to apply the attached minimal documentation patch.

Also, there is a SESSION_USER, but no SESSION_ROLE. Not sure of the 
rationale.

-- 
Fabien.

Attachment: current-role-doc-1.patch
Description: text/x-diff (663 bytes)

Responses

pgsql-hackers by date

Next:From: Michael PaquierDate: 2017-05-06 10:40:42
Subject: Re: logical replication and PANIC during shutdown checkpoint in publisher
Previous:From: Tom LaneDate: 2017-05-06 06:09:22
Subject: Re: Should pg_current_wal_location() become pg_current_wal_lsn()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group