CREATE ROLE bug? - Mailing list pgsql-hackers

From Bruce Momjian
Subject CREATE ROLE bug?
Date
Msg-id Y9EuvCMnHxs3AqN7@momjian.us
Whole thread Raw
Responses Re: CREATE ROLE bug?
List pgsql-hackers
This works in PG 15:

        CREATE ROLE service CREATEROLE;
        CREATE ROLE service1 WITH LOGIN IN ROLE service;
        SET SESSION AUTHORIZATION service;
        CREATE ROLE service2 WITH LOGIN IN ROLE service;

but generates an error in git master:

        CREATE ROLE service CREATEROLE;
        CREATE ROLE service1 WITH LOGIN IN ROLE service;
        SET SESSION AUTHORIZATION service;
        CREATE ROLE service2 WITH LOGIN IN ROLE service;
-->     ERROR:  must have admin option on role "service"

If I make 'service' a superuser, it works:

        CREATE ROLE service SUPERUSER;
        CREATE ROLE service1 WITH LOGIN IN ROLE service;
        SET SESSION AUTHORIZATION service;
        CREATE ROLE service2 WITH LOGIN IN ROLE service;

It is probably related to this discussion and change:

       https://www.postgresql.org/message-id/flat/CA+TgmobGds7oefDjZUY+k_J7p1sS=pTq3sZ060qdb=oKei1Dkw@mail.gmail.com

I am not sure if the behavior is wrong, the error message is wrong, or
it is working as expected.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

Embrace your flaws.  They make you human, rather than perfect,
which you will never be.



pgsql-hackers by date:

Previous
From: Andrew
Date:
Subject: Re: Fix to enum hashing for dump and restore
Next
From: Robert Haas
Date:
Subject: Re: plpython vs _POSIX_C_SOURCE