Re: Test if a database has any privilege granted to public

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Test if a database has any privilege granted to public
Дата
Msg-id 3300816.1671084655@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Test if a database has any privilege granted to public  (Ron <ronljohnsonjr@gmail.com>)
Ответы Re: Test if a database has any privilege granted to public  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
Ron <ronljohnsonjr@gmail.com> writes:
> Off-topic, but you don't need all those text casts.

Indeed.  Something like this ought to do it:

=# select datname from pg_database where 0::oid = any(select (aclexplode(datacl)).grantee);
  datname
------------
 template1
 template0
 regression
(3 rows)

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: Test if a database has any privilege granted to public
Следующее
От: Willy-Bas Loos
Дата:
Сообщение: Re: tcp keepalives not sent during long query