pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: horse-sheep-goat@protonmail.com
Subject: role_table_grants only shows grantees that are "groups"?
Date: Tue, 04 Jan 2022 17:00:53 +0000
Message-ID: <164131565365.21667.16084584192723027315@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/infoschema-role-table-grants.html
Description:

It seems like the "grantee" column in this table is only ever a "group", not
just roles in general as the documentation seems to say. I know there's not
supposed to be any distinction between users/groups/roles anymore, but, for
some reason this table doesn't list any roles that are assigned to
individuals or that have logins.

test_dw=> SELECT grantee, count(1) FROM information_schema.role_table_grants
GROUP BY 1;
   grantee    | count
--------------+-------
 analytics    |   704
 product      |   144
 underwriting |    92
(3 rows)

test_dw=> SELECT md5(grantor), count(1) FROM
information_schema.role_table_grants GROUP BY 1;
               md5                | count
----------------------------------+-------
 20212be24a1ee5e5a2a76a6bf6c9a685 |     3
 3672351fd359e8c9198a56d9b45b6d41 |    10
 51a1bc84390d0a7db9352f7e158764f7 |    10
 68c4283db8074b12df1660b31c0220a9 |    22
 8570bee3f494838885fe1866c210a29e |     1
 87d2b323c79e710dbdc747a37dbcc94f |     5
 8bfbfe8c656224a77631c5d102736463 |     1
 94e42f20f83a9404506fb83f2e5efc88 |     3
 bd82c4d557f634b7401bcdbfeba70227 |     5
 d258b2c73904a84296ff266d4e243a04 |    11
 d92d63c81d6212f11c5d6bc26d4e198b |   867
 e2818a77f885d2c6d74fd7544295b7e3 |     2
(12 rows)

All but 22 of the hundreds of grantors correspond to an individual with a
login.

I can see there are grants to individuals using psql's "\z" command or
relacl in pg_class. Should they show up in this table? Or is it not
sufficient to just be a "currently enabled role" as the docs say?


Message-ID: <164131565365.21667.16084584192723027315@wrigleys.postgresql.org>
Permalink:  ../164131565365.21667.16084584192723027315@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/164131565365.21667.16084584192723027315@wrigleys.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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, horse-sheep-goat@protonmail.com
  Subject: Re: role_table_grants only shows grantees that are "groups"?
  In-Reply-To: <164131565365.21667.16084584192723027315@wrigleys.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