Re: [PATCH] pg_permissions

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Joel Jacobson <joel(at)compiler(dot)org>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pg_permissions
Date: 2021-03-25 15:16:37
Message-ID: 20210325151637.GA12316@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Mar-25, Joel Jacobson wrote:

> pg_shdepend doesn't contain the aclitem info though,
> so it won't work for pg_permissions if we want to expose
> privilege_type, is_grantable and grantor.

Ah, of course -- the only way to obtain the acl columns is by going
through the catalogs individually, so it won't be possible. I think
this could be fixed with some very simple, quick function pg_get_acl()
that takes a catalog OID and object OID and returns the ACL; then
use aclexplode() to obtain all those details.

> The semantics will not be entirely the same,
> since internal objects are not tracked in pg_shdepend,
> but I think this is an improvement.

I just realized that pg_shdepend will not show anything for pinned users
(the bootstrap superuser). I *think* this is not a problem.

--
Álvaro Herrera 39°49'30"S 73°17'W
"E pur si muove" (Galileo Galilei)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-03-25 15:30:31 Re: [PATCH] Add extra statistics to explain for Nested Loop
Previous Message David Steele 2021-03-25 15:15:10 Re: FETCH FIRST clause PERCENT option