pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow CURRENT_ROLE where CURRENT_USER is accepted
Date: Thu, 17 Sep 2020 10:01:18 +0000
Message-ID: <E1kIqj8-0003r9-Q8@gemulon.postgresql.org> (raw)

Allow CURRENT_ROLE where CURRENT_USER is accepted

In the particular case of GRANTED BY, this is specified in the SQL
standard.  Since in PostgreSQL, CURRENT_ROLE is equivalent to
CURRENT_USER, and CURRENT_USER is already supported here, adding
CURRENT_ROLE is trivial.  The other cases are PostgreSQL extensions,
but for the same reason it also makes sense there.

Reviewed-by: Vik Fearing <vik@postgresfriends.org>
Reviewed-by: Asif Rehman <asifr.rehman@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/f2feac44-b4c5-f38f-3699-2851d6a76dc9%402ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/45b9805706fdc726906fc9187c9a7b38c559755c

Modified Files
--------------
doc/src/sgml/ref/alter_aggregate.sgml              |   2 +-
doc/src/sgml/ref/alter_collation.sgml              |   2 +-
doc/src/sgml/ref/alter_conversion.sgml             |   2 +-
doc/src/sgml/ref/alter_database.sgml               |   2 +-
doc/src/sgml/ref/alter_domain.sgml                 |   2 +-
doc/src/sgml/ref/alter_event_trigger.sgml          |   2 +-
doc/src/sgml/ref/alter_foreign_data_wrapper.sgml   |   2 +-
doc/src/sgml/ref/alter_foreign_table.sgml          |   2 +-
doc/src/sgml/ref/alter_function.sgml               |   2 +-
doc/src/sgml/ref/alter_group.sgml                  |   1 +
doc/src/sgml/ref/alter_language.sgml               |   2 +-
doc/src/sgml/ref/alter_large_object.sgml           |   2 +-
doc/src/sgml/ref/alter_materialized_view.sgml      |   2 +-
doc/src/sgml/ref/alter_opclass.sgml                |   2 +-
doc/src/sgml/ref/alter_operator.sgml               |   2 +-
doc/src/sgml/ref/alter_opfamily.sgml               |   2 +-
doc/src/sgml/ref/alter_policy.sgml                 |   2 +-
doc/src/sgml/ref/alter_procedure.sgml              |   2 +-
doc/src/sgml/ref/alter_publication.sgml            |   2 +-
doc/src/sgml/ref/alter_role.sgml                   |   2 +
doc/src/sgml/ref/alter_routine.sgml                |   2 +-
doc/src/sgml/ref/alter_schema.sgml                 |   2 +-
doc/src/sgml/ref/alter_sequence.sgml               |   2 +-
doc/src/sgml/ref/alter_server.sgml                 |   2 +-
doc/src/sgml/ref/alter_statistics.sgml             |   2 +-
doc/src/sgml/ref/alter_subscription.sgml           |   2 +-
doc/src/sgml/ref/alter_table.sgml                  |   2 +-
doc/src/sgml/ref/alter_tablespace.sgml             |   2 +-
doc/src/sgml/ref/alter_tsconfig.sgml               |   2 +-
doc/src/sgml/ref/alter_tsdictionary.sgml           |   2 +-
doc/src/sgml/ref/alter_type.sgml                   |   2 +-
doc/src/sgml/ref/alter_user.sgml                   |   1 +
doc/src/sgml/ref/alter_user_mapping.sgml           |   4 +-
doc/src/sgml/ref/alter_view.sgml                   |   2 +-
doc/src/sgml/ref/create_policy.sgml                |   2 +-
doc/src/sgml/ref/create_schema.sgml                |   1 +
doc/src/sgml/ref/create_tablespace.sgml            |   2 +-
doc/src/sgml/ref/create_user_mapping.sgml          |   4 +-
doc/src/sgml/ref/drop_owned.sgml                   |   2 +-
doc/src/sgml/ref/drop_user_mapping.sgml            |   4 +-
doc/src/sgml/ref/grant.sgml                        |   1 +
doc/src/sgml/ref/reassign_owned.sgml               |   4 +-
doc/src/sgml/ref/revoke.sgml                       |   1 +
src/backend/parser/gram.y                          |  11 +
src/backend/utils/adt/acl.c                        |   2 +
src/include/nodes/parsenodes.h                     |   1 +
.../modules/unsafe_tests/expected/rolenames.out    | 622 ++++++++++++---------
src/test/modules/unsafe_tests/sql/rolenames.sql    | 225 ++++----
48 files changed, 534 insertions(+), 416 deletions(-)



Message-ID: <E1kIqj8-0003r9-Q8@gemulon.postgresql.org>
Permalink:  ../E1kIqj8-0003r9-Q8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kIqj8-0003r9-Q8@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Allow CURRENT_ROLE where CURRENT_USER is accepted
  In-Reply-To: <E1kIqj8-0003r9-Q8@gemulon.postgresql.org>
  References: <E1kIqj8-0003r9-Q8@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox