Hi @LiborOndruek-3549,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
As i understand that you are facing permission issues while creating and dropping roles in Azure PostgreSQL Flexible Server.
When you create a role with a parameter enabled, such as REPLICATION, the role is created without membership to the rixo_sa role. This is because the rixo_sa role does not have the CREATEROLE attribute and the ADMIN option on the rixo_role_for_test2 role.
To grant the rixo_role_for_test2 role to the rixo_etl role, you need to have the ADMIN option on the rixo_role_for_test2 role. You can grant the ADMIN option to the rixo_sa role by running the following command:
GRANT rixo_role_for_test2 TO rixo_sa WITH ADMIN OPTION;
After granting the ADMIN option to the rixo_sa role, you can grant the rixo_role_for_test2 role to the rixo_etl role:
GRANT rixo_role_for_test2 TO rixo_etl;
Regarding the issue with dropping the role, you need to have the CREATEROLE attribute and the ADMIN option on the rixo_role_for_test2 role to drop it. Since you do not have these permissions, you cannot drop the role. You can try to contact your database administrator to grant you the necessary permissions to drop the role.
For more information, please refer the document: https://www.postgresql.org/docs/16/release-16.html
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.