Search Postgresql Archives

Re: Fwd: not able to give usage access to public schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Postgres version and where are you running this e.g. cloud service?

What does \dn+ public show before and after you redo commands as asked below?

Can you start over and provide complete sequence for above including CREATE ROLE and what user you are doing the above as?




On Fri, Jun 12, 2020 at 10:11 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>> 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.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux