1
votes

I have three users created with CREATEDB access. I need to alter them to SUPERUSER. how do i resolve this ?

I have tried "ALTER USER WITH superuser;" but I keep getting the below error.

ALTER USER WITH superuser;

An error occurred when executing the SQL command: ALTER USER WITH superuser

Amazon Invalid operation: syntax error at or near "superuser" Position: 25; [SQL State=42601, DB Errorcode=500310] 1 statement failed.

Execution time: 0sstrong text

2

2 Answers

2
votes

Use the following

ALTER USER <username> WITH CREATEUSER

similarly if you like to take away superuser privilege

ALTER USER <username> WITH NOCREATEUSER
0
votes

You don't need to mention with, just type

alter user <username> createuser

Here is a link to the documentation from aws https://docs.aws.amazon.com/redshift/latest/dg/r_superusers.html