From: | "Joel Jacobson" <joel(at)compiler(dot)org> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | [PATCH] pg_ownerships system view |
Date: | 2021-03-07 00:08:34 |
Message-ID: | 44699c89-3bfe-4e83-816c-b4c76a3c4b1f@www.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Attached is a suggestion of adding a convenience view,
allowing quickly looking up all objects owned by a given user.
Example:
SELECT * FROM ownerships WHERE rolname = 'joel' LIMIT 5;
regclass | obj_desc | rolname
------------------+-----------------------------------+---------
pg_class | table t | joel
pg_class | table foobar.foobar_policed_table | joel
pg_class | view ownerships | joel
pg_collation | collation foobar.foobar | joel
pg_event_trigger | event trigger foobar | joel
(5 rows)
This is similar to the suggested pg_permissions system view in other thread.
/Joel
Attachment | Content-Type | Size |
---|---|---|
0002-pg_ownerships.patch | application/octet-stream | 5.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2021-03-07 00:40:01 | Re: WIP: document the hook system |
Previous Message | Michael Paquier | 2021-03-06 23:45:28 | Re: [PATCH] pgbench: Bug fix for the -d option |