Re: Backward compat issue with v16 around ROLEs - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Backward compat issue with v16 around ROLEs
Date
Msg-id 076fe1a7-b72c-4ba1-8589-cd7ece3fd982@aklaver.com
Whole thread Raw
In response to Backward compat issue with v16 around ROLEs  (Dominique Devienne <ddevienne@gmail.com>)
Responses Re: Backward compat issue with v16 around ROLEs
List pgsql-general
On 9/11/24 07:41, Dominique Devienne wrote:
> Hi. I'm going around in circles trying to solve an issue with our

> on v16:
> 
> D:\pdgm\trunk\psc2>psql service=pau16
> psql (17beta3, server 16.1)
> Type "help" for help.
> 
> ddevienne=> create role dd_owner createrole;
> CREATE ROLE
> ddevienne=> create role dd_admin noinherit;
> CREATE ROLE
> ddevienne=> grant dd_owner to dd_admin;
> GRANT ROLE
> ddevienne=> set role dd_owner;
> ERROR:  permission denied to set role "dd_owner"
> ddevienne=> grant dd_owner to current_user;
> GRANT ROLE
> ddevienne=> set role dd_owner;
> SET
> ddevienne=> create role dd_user;
> CREATE ROLE
> ddevienne=> grant dd_admin to dd_user;
> ERROR:  permission denied to grant role "dd_admin"
> DETAIL:  Only roles with the ADMIN option on role "dd_admin" may grant
> this role.
> ddevienne=>
> 
> 

What user did you do the above as?

On my Postgres 16.4 instance logged in as postgres:

test=# create role dd_owner createrole;
CREATE ROLE
test=# create role dd_admin noinherit;
CREATE ROLE
test=# grant dd_owner to dd_admin;
GRANT ROLE
test=# set role dd_owner;
SET
test=> grant dd_owner to current_user;
ERROR:  permission denied to grant role "dd_owner"
DETAIL:  Only roles with the ADMIN option on role "dd_owner" may grant 
this role.
test=> create role dd_user;
CREATE ROLE
test=> grant dd_admin to dd_user;
ERROR:  permission denied to grant role "dd_admin"
DETAIL:  Only roles with the ADMIN option on role "dd_admin" may grant 
this role.

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Backward compat issue with v16 around ROLEs
Next
From: Dominique Devienne
Date:
Subject: Re: Backward compat issue with v16 around ROLEs