Re: "CURRENT_ROLE" is not documented

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "CURRENT_ROLE" is not documented
Date: 2017-05-06 18:36:11
Message-ID: 28362.1494095771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> I agree we ought to document this, but we likely need to mention
>> the discrepancy from the spec, too.

> Yep. A little subtle, though. Maybe it is enough to just say that for pg a
> user is a role, which is not the case in the standard?

I did it like this:

*** 15943,15948 ****
--- 15956,15966 ----
functions with the attribute <literal>SECURITY DEFINER</literal>.
In Unix parlance, the session user is the <quote>real user</quote> and
the current user is the <quote>effective user</quote>.
+ <function>current_role</function> and <function>user</function> are
+ synonyms for <function>current_user</function>. (The SQL standard draws
+ a distinction between <function>current_role</function>
+ and <function>current_user</function>, but <productname>PostgreSQL</>
+ does not, since it unifies users and roles into a single kind of entity.)
</para>

<para>

I stole the "unifies..." language out of the CREATE ROLE page.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2017-05-06 18:50:16 Re: SUBSCRIPTIONS and pg_upgrade
Previous Message Fabien COELHO 2017-05-06 17:42:09 Re: "CURRENT_ROLE" is not documented