"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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
current-role-doc-1.patch text/x-diff 663 bytes

Responses

Browse pgsql-hackers by date

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