Re: how to check specific user_name have “SELECT ON ALL TABLES IN SCHEMA <tableschema>” privilege or not ?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: yanliang lei <msdnchina(at)163(dot)com>
Cc: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: how to check specific user_name have “SELECT ON ALL TABLES IN SCHEMA <tableschema>” privilege or not ?
Date: 2022-09-11 16:03:23
Message-ID: CAKFQuwa8-a7XF6Utdxrrioa1SeEzuXtUJ5PSQ3FKArM4BDUqXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

On Sunday, September 11, 2022, yanliang lei <msdnchina(at)163(dot)com> wrote:

> Dear everyone,
> how to check specific <user_name> have “SELECT ON ALL TABLES IN SCHEMA
> <tableschema>” privilege or not ?
>

This is not an appropriate list to ask general usage questions. We have a
-general list for those.

But, that isn’t a privilege. Its a grant action. The privilege is just
select on a table in a schema. So you have to check every table in the
schema individually. The functions and the catalogs documented to retrieve
this information - start putting them together into a query. I’m unable to
go look for the specific details right now.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Noah Misch 2022-09-12 04:46:47 Re: SQL-standard function bodies and creating SECURITY DEFINER routines securely
Previous Message Jürgen Purtz 2022-09-11 11:48:09 Re: DocBook 5.2

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Gustafsson 2022-09-11 20:57:50 Re: lippq client library and openssl initialization: PQinitOpenSSL()
Previous Message Junwang Zhao 2022-09-11 15:40:03 Re: [EXT] Re: log_min_messages = warning