Re: Allow CURRENT_ROLE in GRANTED BY

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow CURRENT_ROLE in GRANTED BY
Date: 2020-06-29 12:47:38
Message-ID: 13369949-9e86-9214-8952-a74befaea41d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-06-24 23:08, Alvaro Herrera wrote:
> On 2020-Jun-24, Peter Eisentraut wrote:
>
>> I was checking some loose ends in SQL conformance, when I noticed: We
>> support GRANT role ... GRANTED BY CURRENT_USER, but we don't support
>> CURRENT_ROLE in that place, even though in PostgreSQL they are equivalent.
>> Here is a trivial patch to add that.
>
> Hmm, since this adds to RoleSpec, this change makes every place that
> uses that production also take CURRENT_ROLE, so we'd need to document in
> all those places. For example, alter_role.sgml, create_schema.sgml,
> etc.

Good point. Here is an updated patch that updates all the documentation
places where CURRENT_USER is mentioned.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Allow-CURRENT_ROLE-where-CURRENT_USER-is-accepted.patch text/plain 41.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-06-29 12:50:55 Re: xid wraparound danger due to INDEX_CLEANUP false
Previous Message higuchi.daisuke@fujitsu.com 2020-06-29 12:34:10 RE: [Bug fix]There is the case archive_timeout parameter is ignored after recovery works.