Home > Net >  How do you remove a role attribute in postgres?
How do you remove a role attribute in postgres?

Time:11-28

In postgres I have used the following to assign the SuperUser attribute to 'myrole':

ALTER ROLE myrole WITH Superuser;

I now want to remove the the Superuser attribute, but I can't find the correct command online or on Postgres docs, only about setting it.

Can someone let me know how it is done please?

I have tried replacing "WITH" with "DROP", "REVOKE", "REMOVE", but no luck.

CodePudding user response:

As instructed in the manual:

ALTER ROLE myrole WITH NOSUPERUSER;

You must be superuser, of course, to do that.

  • Related