Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Fabien COELHO
functions with the attribute SECURITY DEFINER. In Unix parlance, the session user is the real user and the current user is the effective user. + current_role and user are + synonyms for current_user. (The SQL standard draws + a distinction between current_role +

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Tom Lane
Fabien COELHO 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

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Fabien COELHO
psql> SELECT CURRENT_ROLE; current_user -- not a typo, it really says "current_user" Not as of HEAD ;-) Good:-) I was connecting to a 9.6.2 server from a pg10dev client. Is there a special reason why it does not appear in the documentation? Oversight, evidently. Ok. Also,

Re: [HACKERS] "CURRENT_ROLE" is not documented

2017-05-06 Thread Tom Lane
Fabien COELHO writes: > 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" Not as of HEAD