Search Postgresql Archives

Re: How to grant role to other user

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

 



On Tue, Sep 3, 2024 at 4:31 PM Andrus <kobruleht2@xxxxxx> wrote:
>     GRANT "eeva_owner" TO "ingmar.e"
> This command throws error
>  ERROR: permission denied to grant role "eeva_owner"

Works are expected when I try it. FWIW. --DD

c:\Users\ddevienne>psql service=pau16
psql (17beta3, server 16.1)

ddevienne=> create role eeva_owner;
CREATE ROLE
ddevienne=> create role ingmar LOGIN CREATEROLE PASSWORD 'foo';
CREATE ROLE
ddevienne=> grant connect on database ddevienne to ingmar;
GRANT
ddevienne=> \q

c:\Users\ddevienne>psql "service=pau16 user=ingmar"
Password for user ingmar:
psql (17beta3, server 16.1)

ddevienne=> create role "ingmar.e" LOGIN;
CREATE ROLE
ddevienne=> grant eeva_owner to "ingmar.e";
ERROR:  permission denied to grant role "eeva_owner"
DETAIL:  Only roles with the ADMIN option on role "eeva_owner" may
grant this role.
ddevienne=> \q

c:\Users\ddevienne>psql service=pau16

ddevienne=> grant eeva_owner TO ingmar WITH ADMIN OPTION;
GRANT ROLE
ddevienne=> \q

c:\Users\ddevienne>psql "service=pau16 user=ingmar"
Password for user ingmar:
psql (17beta3, server 16.1)

ddevienne=> grant eeva_owner to "ingmar.e";
GRANT ROLE
ddevienne=>






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux