From: | "Joel Jacobson" <joel(at)compiler(dot)org> |
---|---|
To: | "Isaac Morland" <isaac(dot)morland(at)gmail(dot)com> |
Cc: | 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-20 06:32:57 |
Message-ID: | 6db3c8f0-7067-41cc-b0ac-ad6ab1b92e19@app.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 19, 2024, at 16:23, Isaac Morland wrote:
> I have no idea how often this would be useful, but I wonder if it could
> work to have overloaded single-parameter versions for each of
> regprocedure (pg_proc.proacl), regclass (pg_class.relacl), …. To call,
> just cast the OID to the appropriate reg* type.
>
> For example: To get the ACL for table 'example_table', call pg_get_acl
> ('example_table'::regclass)
+1
New patch attached.
I've added overloaded versions for regclass and regproc so far:
\df pg_get_acl
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+------------+------------------+------------------------+------
pg_catalog | pg_get_acl | aclitem[] | classid oid, objid oid | func
pg_catalog | pg_get_acl | aclitem[] | objid regclass | func
pg_catalog | pg_get_acl | aclitem[] | objid regproc | func
(3 rows)
/Joel
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Add-pg_get_acl.patch | application/octet-stream | 10.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey M. Borodin | 2024-06-20 07:17:44 | Re: datfrozenxid > relfrozenxid w/ crash before XLOG_HEAP_INPLACE |
Previous Message | Michael Paquier | 2024-06-20 06:12:32 | Re: Sequence Access Methods, round two |