All Products
Search
Document Center

PolarDB:Create a user

Last Updated:Sep 24, 2026

Creates a database user for PolarDB for PostgreSQL (Compatible with Oracle).

Syntax

CREATE USER name [IDENTIFIED BY password]

Parameters

ParameterDescription
nameThe name of the new user.
Note
  • Contains one to three of the following character types: lowercase letters, digits, and underscores (_).
  • Starts with a lowercase letter.
  • Is 1 to 63 characters in length.
passwordThe password of the new user.
Note
  • Contains one to three of the following character types: lowercase letters, digits, and underscores (_).
  • Starts with a lowercase letter.
  • Is 1 to 63 characters in length.

Description

When you run the CREATE USER statement, PolarDB for PostgreSQL (Compatible with Oracle) also creates a schema with the same name as the username. The new user owns that schema.

Note
  • Only a privileged account can run this statement. To create a privileged account, see Create an account.
  • The account created by this statement is a standard account. For the permissions of standard accounts, see Account permissions.

Examples

Create a user named "user" with the password "password".

CREATE USER user IDENTIFIED BY password;

References

Create a database account