Re: Privileges on public schema can't be revoked? - Mailing list pgsql-general

From Stephen Frost
Subject Re: Privileges on public schema can't be revoked?
Date
Msg-id 20160906202349.GQ4028@tamriel.snowman.net
Whole thread Raw
In response to Re: Privileges on public schema can't be revoked?  (Greg Fodor <gfodor@gmail.com>)
Responses Re: Privileges on public schema can't be revoked?
List pgsql-general
Gregm

* Greg Fodor (gfodor@gmail.com) wrote:
> Ahhhh, I wasn't aware of the PUBLIC meta-role. Not sure if it's useful
> feedback, I spent a lot of time digging around the web for solutions
> that would basically let me query the database to see all of the
> effective privileges for a user, and none of the solutions I found
> were able to get me to a point where this was clear, since they all
> queried against the various information schema tables that I think
> neglect to take into account the PUBLIC meta-role.

\dn+ in psql will give you the access privileges for all schemas.

I'd have to look at the "other solutions" you're referring to, but, in
general, we do not exclude the public role in any way from the access
privilege system.  The \dn+ above should return something like:

postgres=UC/postgres+
=UC/postgres

for the Access Privileges column for the public schema, which shows that
the 'postgres' role and the '' role (aka, 'public') have been granted
both USAGE and CREATE on that schema.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: Greg Fodor
Date:
Subject: Re: Privileges on public schema can't be revoked?
Next
From: Tom Lane
Date:
Subject: Re: Privileges on public schema can't be revoked?