information_schema.applicable_roles behavior does not match documentation

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: marc(dot)berhault(at)gmail(dot)com
Subject: information_schema.applicable_roles behavior does not match documentation
Date: 2018-02-01 07:48:02
Message-ID: 151747128215.1240.1598372623554241748@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/infoschema-applicable-roles.html
Description:

The documentation for applicable_roles says: "The current user itself is
also an applicable role." (see
https://www.postgresql.org/docs/current/static/infoschema-applicable-roles.html)

My understanding is that the current user should be listed in
information_schema.applicable_roles, but a quick check shows that it is
not.

marc=> select * from information_schema.applicable_roles;
grantee | role_name | is_grantable
---------+-----------+--------------
marc | foo | YES
(1 row)

It properly shows the role I am a member of, but not myself.

By contrast, the docs for enabled_roles also say that it includes the
current user, and it actually does:

marc=> select * from information_schema.enabled_roles;
role_name
-----------
foo
marc
(2 rows)

This also isn't a user vs role issue. If I "set role foo", it is no longer
visible in applicable_roles.

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-02-01 12:09:53 A simple question
Previous Message Bruce Momjian 2018-01-31 22:10:15 Re: pg_upgrade docs are confusing if PostgreSQL's versioning system/language isn't known to reader