How do I create a user with superuser role in Postgres serwer with google cloud console?
When I create databases in google cloud, the default user is a non-superuser. From this role it is not possible to upgrade.
Log into PostgreSQL and run the following ALTER USER command to change user test_user to superuser. Replace test_user with username as per your requirement. postgres-# ALTER USER test_user WITH SUPERUSER; In the above command, we use WITH SUPERUSER clause to change user to superuser.
Superusers retain all permissions regardless of GRANT and REVOKE commands. To create a new database superuser, log on to the database as a superuser and issue a CREATE USER command or an ALTER USER command with the CREATEUSER permission.
no way:
https://cloud.google.com/sql/docs/postgres/users
The postgres user is part of the
cloudsqlsuperuser
role, and has the following attributes (privileges): CREATEROLE, CREATEDB, and LOGIN. It does not have theSUPERUSER
orREPLICATION
attributes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With