We use Azure Database for PostgreSQL flexible servers. My requirement is creating admin user that should be able to anything (DDL/Alter etc.) with any table in any schema throughout the database, irrespective of which user has created that table, function, procedure or sequence etc.
I tried creating admin user according to Azure Docs:
Your server admin user is a member of the azure_pg_admin role. However, the server admin account is not part of the azure_superuser role. Since this service is a managed PaaS service, only Microsoft is part of the super user role.
CREATE USER <new_user> CREATEDB CREATEROLE PASSWORD '<StrongPassword!>';
GRANT azure_pg_admin TO <new_user>;
I created a user called test_admin
and granted it the azure_pg_admin
role as the docs said. With another regular user, I logged in and created a table and the test_admin
couldn't query it, and got this error:
permission denied for table
even though the test_admin
have the azure_pg_admin
.
Can anyone help me with this ?