Re: Fwd: not able to give usage access to public schema - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Fwd: not able to give usage access to public schema
Date
Msg-id 46c038b7-034c-261b-1780-280306558dae@aklaver.com
Whole thread Raw
In response to Fwd: not able to give usage access to public schema  (sekhar chandra <sekharclouddbengineer@gmail.com>)
List pgsql-general
On 6/13/20 10:33 AM, sekhar chandra wrote:
> Adrian - when I follow the same steps what you did . in my case , the 
> result is false.
> 
> 
> grant usage on schema public to role_test ;
> GRANT
> 
> SELECT rolname, has_schema_privilege('role_test', 'public', 'usage')
> from pg_roles where rolname = 'role_test';
>     rolname  | has_schema_privilege
> -----------+----------------------
>    role_test | f
> 

Might be a good time to point out :) :

https://www.postgresql.org/docs/12/ddl-schemas.html#DDL-SCHEMAS-PUBLIC

" Note that by default, everyone has CREATE and USAGE privileges on the 
schema public. This allows all users that are able to connect to a given 
database to create objects in its public schema. "


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_dump of database with numerous objects
Next
From: Bruce Momjian
Date:
Subject: Re: Oracle vs. PostgreSQL - a comment