Re: Test if a database has any privilege granted to public - Mailing list pgsql-general

From Tom Lane
Subject Re: Test if a database has any privilege granted to public
Date
Msg-id 3300816.1671084655@sss.pgh.pa.us
Whole thread Raw
In response to Re: Test if a database has any privilege granted to public  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Test if a database has any privilege granted to public  (Bryn Llewellyn <bryn@yugabyte.com>)
List 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 by date:

Previous
From: Ron
Date:
Subject: Re: Test if a database has any privilege granted to public
Next
From: Willy-Bas Loos
Date:
Subject: Re: tcp keepalives not sent during long query