pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: sekhar chandra <sekharclouddbengineer@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Fwd: not able to give usage access to public schema
Date: Fri, 12 Jun 2020 22:11:00 -0700
Message-ID: <cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com> (raw)
In-Reply-To: <CAB7a7NaYcD9U+uWrMni7zstsQJSf2e9KKcyp5pzHSwuz4BbtMw@mail.gmail.com>
References: <CAB7a7NamePJDb2EXp+WogHxw3GoVFN62TsbnnYP9tYZrHgmYgg@mail.gmail.com>
	<CAB7a7NaYcD9U+uWrMni7zstsQJSf2e9KKcyp5pzHSwuz4BbtMw@mail.gmail.com>

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





view thread (7+ messages)  latest in thread

Message-ID: <cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com>
Permalink:  ../cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com/
Also on:    postgresql.org/message-id/cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, sekharclouddbengineer@gmail.com
  Subject: Re: Fwd: not able to give usage access to public schema
  In-Reply-To: <cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com>
  References: <CAB7a7NamePJDb2EXp+WogHxw3GoVFN62TsbnnYP9tYZrHgmYgg@mail.gmail.com> <CAB7a7NaYcD9U+uWrMni7zstsQJSf2e9KKcyp5pzHSwuz4BbtMw@mail.gmail.com> <cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox