Re: Add pg_ownerships and pg_privileges system views

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add pg_ownerships and pg_privileges system views
Date: 2024-10-20 14:52:15
Message-ID: 306c3ab4-f9d2-4e66-87d0-03d155325f1b@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 20, 2024, at 12:14, Alvaro Herrera wrote:
> I think the function calls should be in the FROM clause, and restrict the
> pg_shdepend rows to only the ones in the current database:

Cool. I assume pg_ownerships should be changed in the same way?
New patch attached.

> 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.

Hmm, yeah that's a bit awkward. Maybe okay if clearly documented.

/Joel

Attachment Content-Type Size
v3-0001-Add-pg_ownerships-and-pg_privileges-system-views.patch application/octet-stream 16.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-10-20 15:56:55 Re: Fix C23 compiler warning
Previous Message Andrey M. Borodin 2024-10-20 14:18:33 Re: Using read_stream in index vacuum