From: richard coleman <rcoleman.ascentgl@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: how to list privileges on the database object itself via SQL?
Date: Wed, 26 Apr 2023 12:34:21 -0400
Message-ID: <CAGA3vBvanu7UBtaaVv9PH25Ko==5F2wewhPWTTra8wqexdDAdQ@mail.gmail.com> (raw)
All,
This might sound like a silly question, but how would I list the privileges
the various roles have on the database objects themselves?
There appear to be a million ways to list the privileges on various
database objects; tables, views, foreign tables, etc. but for the life of
me there doesn't appear to an analogous way to get permissions on the
database objects themselves.
At the moment all that I've found is:
select has_database_privilege('role','db_name', 'CREATE') as can_create;
select has_database_privilege('role','db_name', 'CONNECT') as can_connect;
select has_database_privilege('role','db_name', 'TEMP') as can_temp;
Am I missing something?
Thanks,
rik.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rcoleman.ascentgl@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: how to list privileges on the database object itself via SQL?
In-Reply-To: <CAGA3vBvanu7UBtaaVv9PH25Ko==5F2wewhPWTTra8wqexdDAdQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox