Re: [HACKERS] "CURRENT_ROLE" is not documented
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] "CURRENT_ROLE" is not documented |
Дата | |
Msg-id | 28362.1494095771@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] "CURRENT_ROLE" is not documented (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: [HACKERS] "CURRENT_ROLE" is not documented
|
Список | pgsql-hackers |
Fabien COELHO <coelho@cri.ensmp.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 sessionuser 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
В списке pgsql-hackers по дате отправления: