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 cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com
Whole thread Raw
In response to Fwd: not able to give usage access to public schema  (sekhar chandra <sekharclouddbengineer@gmail.com>)
Responses Re: Fwd: not able to give usage access to public schema  (sekhar chandra <sekharclouddbengineer@gmail.com>)
List pgsql-general
On 6/12/20 3:56 PM, sekhar chandra wrote:
> I am not able to give usage permission to public schema. below are the 
> steps.
> 
> 
> Logged in as super user
> created a new user as user1
> grant usage on public to user1

Either the above is a cut and paste error or you got an error:

grant usage on public to role_test ;
ERROR:  relation "public" does not exist

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 | t


> 
> command completed successfully , but verification statement showing he 
> doesnt have usage permission.
> SELECT rolname, has_schema_privilege(rolname, 'public', 'usage') from 
> pg_roles;
> 
> this is strage. what could go wrong.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Returning SELECTed rows immediately instead of all at the end?
Next
From: Ron
Date:
Subject: Re: Returning SELECTed rows immediately instead of all at the end?