Re: Add pg_ownerships and pg_privileges system views - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: Add pg_ownerships and pg_privileges system views
Date
Msg-id eaf80db4-476d-4dfb-9768-990bb64f6da6@app.fastmail.com
Whole thread Raw
In response to Re: Add pg_ownerships and pg_privileges system views  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Hi hackers,

As noted in previous feedback, relying on pg_shdepend leads to a less-than-ideal
behavior: no privileges are displayed for an object until at least one privilege
is granted to a role other than the owner, as explained by Alvaro:

On Sun, Oct 20, 2024, at 12:14, Alvaro Herrera wrote:
> Now, depending on pg_shdepend for this means that you don't report
> anything for an object until a GRANT to another user has been executed.
> For example if you REVOKE some priv from the object owner, nothing is
> shown until a GRANT is done for another user (and at that point onwards,
> privs by the owner are shown).  This seems less than ideal, but I'm not
> sure how to do different, other than ditching the use of pg_shdepend
> entirely.

I'm considering withdrawing this patch, due to this awkwardness.

Do we still want pg_ownerships? If so, I can submit it as a separate patch.

Are there any idea on how to address the underlying dependency issue so that
pg_privileges can report owner privileges consistently from the start,
without requiring a subsequent grant to another user?

/Joel



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: New "single" COPY format
Next
From: Tom Lane
Date:
Subject: Re: Improving default column names/aliases of subscript text expressions