Re: Add pg_get_acl() function get the ACL for a database object

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>
Cc: "Isaac Morland" <isaac(dot)morland(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add pg_get_acl() function get the ACL for a database object
Date: 2024-06-25 07:13:16
Message-ID: 295f8647-7a83-4af0-bb58-7bdd514d49e8@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 25, 2024, at 08:42, Michael Paquier wrote:
> On Tue, Jun 25, 2024 at 08:06:41AM +0200, Joel Jacobson wrote:
>> Not sure if I see how to implement it for pg_get_acl() though.
>>
>> I've had a look at how pg_describe_object() works for this case:
>>
>> SELECT pg_describe_object(0,'t'::regclass::oid,0);
>> ERROR: unsupported object class: 0
>>
>> I suppose this is the error message we want in pg_get_acl() when
>> the class ID is invalid?
>
> Ah, and here I thought that this was also returning NULL. My previous
> work in this area only focused on the object OIDs, not their classes.
> At the end, I'm OK to keep your patch as it is, checking only for the
> case of pinned dependencies in pg_depend as we do for
> pg_describe_object().
>
> It's still a bit confusing, but we've been living with that for years
> now without anybody complaining except me, so perhaps that's fine at
> the end to keep that as this is still useful. If we change that,
> applying the same rules across the board would make the most sense.

OK, cool.

New version attached that fixes the indentation of the example,
and uses <literal>NULL</literal> instead of just NULL in the doc.

/Joel

Attachment Content-Type Size
v8-0001-Add-pg_get_acl.patch application/octet-stream 7.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2024-06-25 08:06:10 RE: Slow catchup of 2PC (twophase) transactions on replica in LR
Previous Message Masahiko Sawada 2024-06-25 06:59:41 Re: New standby_slot_names GUC in PG 17