This topic describes how to create a user for a PolarDB for PostgreSQL(Compatible with Oracle) database.
Syntax
CREATE USER name [IDENTIFIED BY password]
Parameters
Parameter | Description |
---|---|
name | The name of the user. Note
|
password | The password of the user. Note
|
Description
When you execute the CREATE USER statement, PolarDB for PostgreSQL(Compatible with Oracle) creates a schema that uses the same name as the user. The schema is owned by the user.
Note
- You can execute this statement by using only a privileged account. For information about how to create a privileged account, see Create an account.
- You can execute this statement to create a standard account. For information about the permissions of standard accounts, see Account permissions.
Examples
Create a user named user and set the password to password.
CREATE USER user IDENTIFIED BY password;