From: | sekhar chandra <sekharclouddbengineer(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Fwd: not able to give usage access to public schema |
Date: | 2020-06-13 17:33:57 |
Message-ID: | CAB7a7NbTVESHYw9urwDk0pnzms=wJUcR-0uCWCO0NCd+gAkBTA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
On Fri, Jun 12, 2020 at 10:11 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> 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(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sreerama Manoj | 2020-06-13 17:42:25 | Re: A query in Streaming Replication |
Previous Message | Sreerama Manoj | 2020-06-13 14:56:37 | A query in Streaming Replication |