Re: postgres function does not handle PUBLIC - expected? - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: postgres function does not handle PUBLIC - expected?
Date
Msg-id 4C6164E50200002500034463@gw.wicourts.gov
Whole thread Raw
In response to Re: postgres function does not handle PUBLIC - expected?  (Szymon Guz <mabewlun@gmail.com>)
Responses Re: postgres function does not handle PUBLIC - expected?  (Szymon Guz <mabewlun@gmail.com>)
Re: postgres function does not handle PUBLIC - expected?  (Kasia Tuszynska <ktuszynska@esri.com>)
List pgsql-admin
Szymon Guz <mabewlun@gmail.com> wrote:

> No, there is no PUBLIC default role in ANY rdbms. In PostgreSQL
> there is PUBLIC schema, not role. In my PostgreSQL database there
> wasn't any such role... but I'll check that now... ok, I've
> checked, I've got 15 roles, none is names PUBLIC, what's more, I
> don't have any roles that cannot login.
>
> run simple query: SELECT rolname FROM pg_roles; and check the
> existence of the PUBLIC role.

Yeah, it's automatically there in a shadowy sort of way.  Try this,
for example, in your cluster with no PUBLIC role:

test=# revoke create on database test from public;
REVOKE
test=# grant select on pg_class to public;
GRANT

-Kevin

pgsql-admin by date:

Previous
From: Szymon Guz
Date:
Subject: Re: postgres function does not handle PUBLIC - expected?
Next
From: Szymon Guz
Date:
Subject: Re: postgres function does not handle PUBLIC - expected?