The superuser permissions are not completely released during the use of RDS, so we recommend that you create a separate account and use the schema to manage your private data space when using the database.

Procedure

  1. Create an account with the logon permission.
    CREATE USER
                newuser LOGIN PASSWORD 'password';
  2. Create a schema for the new account.
    CREATE SCHEMA newuser;GRANT newuser to myuser;ALTER SCHEMA myuser OWNER TO newuser;REVOKE newuser FROM myuser;
    Note
    If newuser is not added to the myuser role before execution of ALTER SCHEMA newuser OWNER TO newuser,  the following permission error is displayed:
    ERROR: must be member of role "newuser"
  3. Use newuser to log on to the database.
    psql -U newuser -h intranet4example.pg.rds.aliyuncs.com -p 3433 pg001
    Password for user newuser:
    psql.bin (9.4.4, server 9.4.1)
    Type "help" for help.