Allow CURRENT_ROLE in GRANTED BY

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-24T06:35:58Z
Lists: pgsql-hackers

Attachments

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.

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

Commits

  1. Fix GRANTED BY support in REVOKE ROLE statements

  2. Allow GRANTED BY clause in normal GRANT and REVOKE statements

  3. Try to stabilize output from rolenames regression test.

  4. Allow CURRENT_ROLE where CURRENT_USER is accepted